Thanks to Jean, Bernt, Akihito, Jim Belonis, Alan Garde.
I have one more query: is it possible to read ONE WORD at a time from
the file.
.
=============================
SUMMARY : Reading one line from file.
======================
more -n 1 filename
=======================
$ cat /etc/motd | while read line
> do
> echo $line
> done
=========================
Take Perl and have a solution for many platforms...
Something like:
#!/usr/local/bin/perl - or whereever you install it...
$inputfile="<your-input-filename>";
open FILE, $inputfile or die "\nCan't open $inputfile\n";
while (<FILE>) {
print "$_ \n"; # print each line...
} # end of while-loop
close FILE;
==========================
Received on Wed May 20 1998 - 11:25:11 NZST