hi,
while reading a file line by line
# name of the script is scriptrd
while read line
do
echo $line
done
while executing
bash$ ./scriptrd
if i give the input as
*
the output is like it displays the contents of the current directory
i jus wanted it to print as * (6 Replies)
i need to read record by record i use script
#!/bin/ksh
for i in 'cat filename'
do
echo $1
done
but i dont get expected result
i just get filename echoed on screen (4 Replies)
Hi Gurus,
I am having an requirement. i have to read a list file which contains file names and send mail to different users based on the files in the list file.
eg. if file a.txt exists then send a mail to a@a.com
simillary for b.txt,c.txt etc.
Thanks for your help,
Nimu (6 Replies)
Hi,
i have a properties file a.prop where entry is like
PROCESS_IDX=0
Now in my shell schript i am doing like this.
#!/bin/sh
. a.prop
..............
-.......................
while read line
do
# tokenize the string by ",".
var=(`echo $line | tr ',' ' '`)
echo $PROCESS_IDX -->... (6 Replies)
Hi Guys,
I am having a file which does not have any name when i do a ls -l
-rw-r--r-- 1 dctrdat1 dctrdata 35 Feb 09 08:04
-rw-r--r-- 1 dctrdat1 dctrdata 11961 Feb 08 06:40 DAI_data.txt
Now i want to see what is inside that file. Can you please let me know how to read... (9 Replies)
i get a name from user first name : last name, in this format. Now i am saving this to a file. what i want is, I do not want to save any name if I already have one entry o that same name..what should i do
for example
user give robert fernandez
this will save in file as robert:fernandez.
if... (5 Replies)
I have 'n' number of files in a folder .each file in the folder "myfolder" is having the content like.
COLNAME
------------
AAAAAA
BBBBBB
CCCCCC
DDDDDD
...
...
...
ZZZZZZ
26 recrod(s) selected.
My request is by reading each file in "myfolder" and format each file such a way... (18 Replies)
I need to extract some content of a file.
Example
file abc
vi abc
ooooooooo
bbbbbbbbb
vvv 1234 5
vvv 6789 3
xxxxxxxxxx
xxxxxxxxxx
i want to extract only the following content from file abc and store in another file say temp.
1234 5
6789 3
what should be my approach? (2 Replies)
Hi ,
i have a parameter which has path of a file. Now i need to have another parameter with the content of that file. I tried the belwo script , can any one please help.
I dont want to use cat command to read. Can we do it with out using cat command.
while read line
do... (9 Replies)
is there any unix tools that can read the text files like through SQL queries? (ie in Hadoop, Impala DB support flat file query) (1 Reply)
Discussion started by: omykarshan
1 Replies
LEARN ABOUT DEBIAN
opal::read
read(3pm) User Contributed Perl Documentation read(3pm)NAME
OpaL::read - Perl extension for reading files and commands.
SYNOPSIS
use OpaL::read qw(functions);
No functions or variables are exported automaticly so you have to specify them here.
DESCRIPTION
OpaL::read is used for reading files and commands.
All functions are autoloaded so they will not be loaded into memory if you have not used them before.
FUNCTIONS
readfile
Reads the content of the specified file and returns a list with the all lines.
USAGE:
@foo = "readfile"($filename);
readfileline
Reads the first line of the specified file and returns a scalar with that line.
USAGE:
$foo = "readfileline"($filename);
readscalarfile
Reads the content of the specified file and returns a scalar with the entire content.
USAGE:
$foo = "readscalarfile"("filename");
readcommand
Reads the content from the output of the specified command and returns a list with the all lines.
USAGE:
@foo = "readcommand"("command");
readcommandline
Reads the first line from output of the specified command and returns a scalar with that line.
USAGE:
$foo = "readcommandline"("command)";
readscalarfile
Reads the content for the output of the specified file and returns a scalar with the entire content.
USAGE:
$foo = "readscalarcommand"($command);
AUTHOR
Ola Lundqvist <ola@inguza.com>
SEE ALSO perl(1).
perl v5.10.1 2012-08-21 read(3pm)