asg@sage.cc.purdue.edu (The Grand Master) (03/07/91)
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
%
%for x in <friends>; do finger $x; done
%
% Thanx.
%
%=============================================================================
%David C Worenklein | No one could tell me where my soul might be;
Try:
for x in `cat filewithlistoffriends` # note these are `s not 's
do
finger $x
done
---------
sar.casm \'sa:r-.kaz-*m\ \sa:r-'kas-tik\ \-ti-k(*-)le-\ n [F sarcasme, fr.
LL sarcasmos, fr. Gk sarkasmos, fr. sarkazein to tear flesh, bite the lips
in rage, sneer, fr. sark-, sarx flesh; akin to Av thwar*s to cut] 1: a
cutting, hostile, or contemptuous remark : GIBE 2: the use of caustic or
ironic language - sar.cas.tic aj
### ##
Courtesy of Bruce Varney ### #
aka -> The Grand Master #
asg@sage.cc.purdue.edu ### ##### #
PUCC ### #
;-) # #
;'> # ##
ahh@glyph.kingston.ny.us (Andy Heffernan) (03/10/91)
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