From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078708811696.tru64-unix-managers.marc@archive.invalid> From: "R. M. Sundaram" Date: Wed, 20 May 1998 09:17:45 +0000 To: tru64-unix-managers Subject: Extracting word from Line X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078708811696 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=""; open FILE, $inputfile or die "\nCan't open $inputfile\n"; while () { print "$_ \n"; # print each line... } # end of while-loop close FILE; ==========================