I have a text file with 50 munbers.
I wanna read these numbers and append "@yahoo.com" and send emails to them using shell scripting..........
How do i read the inetegres from the text file. (1 Reply)
Guys,
I am trying to read text from a file, into arrays.
The format of the file is:
@DATABASE
femotest
@PACKAGE_SPECS
/usr/home/oracle92/sosa/scripts/test.pks
/usr/home/oracle92/sosa/scripts/rep.pks
@PACKAGE_BODIES
... (12 Replies)
How can i have a while loop as follows
while read inputline
do
<task>
done < name_list
and also store the values (delimited) on each line to temp variables so as to print them on screen as follows
while read inputline
do
set name | cut -d "," -f1 name_list # #i know this is not... (1 Reply)
Hi all,
Here is my problem. I want to read data from a file and pass the variable to a select query.
I tried but it doesn't seem to work. Please advise. Example below.
FileName='filekey.txt'
while read LINE
do
var=$LINE
print "For File key $var"
${ORACLE_HOME}/bin/sqlplus -s... (1 Reply)
hello all ,
im trying to read a text file and display its contents. While i got the code running and the output was displayed perfectly for sometime , i started getting Abort(core dump) error . Am i missing something here ? im using HP-UX.
#include <iostream.h>
#include <fstream.h>
#include... (1 Reply)
Hi Guys,
I am having below file which holds data like this
file.txt
name,id,flag
apple,1,Y
apple,2,N
mango,1,Y
mango,2,Y
I need to read the above file and frame a query like this
hive -s -e "create apple_view as select 1 from main_table;"
hive -s -e "create mango_view as select... (11 Replies)
Hello Team,
I have 2 files.one contains english text and another contains Japanese. so i have to read english text and replace the text with Japanesh text in third file.
Basically, I need a help to write japanese language in text/xml file.I heard wstring does this.Not sure how do i write... (2 Replies)
I would like to call a .sql file from a .sh file in linux. The .sql file will contain queries to MySQL database.
I am able to call the .sql file by running .sh file in linux, but the sql query is not working. Below is my syntax. The select statement is throwing below error.
./sample.sql: line... (1 Reply)
Discussion started by: qytan
1 Replies
LEARN ABOUT PHP
ziparchive.open
ZIPARCHIVE.OPEN(3) 1 ZIPARCHIVE.OPEN(3)ZipArchive::open - Open a ZIP file archive
SYNOPSIS
mixed ZipArchive::open (string $filename, [int $flags])
DESCRIPTION
Opens a new zip archive for reading, writing or modifying.
PARAMETERS
o $filename
- The file name of the ZIP archive to open.
o $flags
- The mode to use to open the archive.
o ZipArchive::OVERWRITE
o ZipArchive::CREATE
o ZipArchive::EXCL
o ZipArchive::CHECKCONS
RETURN VALUES
o $Error codes
- Returns TRUE on success or the error code.
o ZipArchive::ER_EXISTS File already exists.
o ZipArchive::ER_INCONS Zip archive inconsistent.
o ZipArchive::ER_INVAL Invalid argument.
o ZipArchive::ER_MEMORY Malloc failure.
o ZipArchive::ER_NOENT No such file.
o ZipArchive::ER_NOZIP Not a zip archive.
o ZipArchive::ER_OPEN Can't open file.
o ZipArchive::ER_READ Read error.
o ZipArchive::ER_SEEK Seek error.
EXAMPLES
Example #1
Open and extract
<?php
$zip = new ZipArchive;
$res = $zip->open('test.zip');
if ($res === TRUE) {
echo 'ok';
$zip->extractTo('test');
$zip->close();
} else {
echo 'failed, code:' . $res;
}
?>
Example #2
Create an archive
<?php
$zip = new ZipArchive;
$res = $zip->open('test.zip', ZipArchive::CREATE);
if ($res === TRUE) {
$zip->addFromString('test.txt', 'file content goes here');
$zip->addFile('data.txt', 'entryname.txt');
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>
PHP Documentation Group ZIPARCHIVE.OPEN(3)