Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!glyph!ahh From: ahh@glyph.kingston.ny.us (Andy Heffernan) Newsgroups: comp.unix.questions Subject: Re: reading a list from a file Message-ID: <1583@glyph.kingston.ny.us> Date: 9 Mar 91 16:49:42 GMT References: <1991Mar6.175759.18653@cunixf.cc.columbia.edu> <7395@mentor.cc.purdue.edu> Reply-To: ahh@glyph.UUCP (Andy Heffernan) Organization: Moji Computing Lines: 26 In article <7395@mentor.cc.purdue.edu> asg@sage.cc.purdue.edu (The Grand Master) writes: >In article <1991Mar6.175759.18653@cunixf.cc.columbia.edu> ta-dw30@cunixa.cc.columbia.edu writes: >%Is there any way to read a list from a file? For instance, could I say >% [...] > Try: >for x in `cat filewithlistoffriends` # note these are `s not 's >do >finger $x >done or (in sh): while read blatz do finger $blatz done < some_file where some_file contains: Joe Larry Bonehead-the-Wonder-Dog etc. -- ------------------------------------------------------------------------- Andy Heffernan $BJ8;z(J uunet!glyph!ahh