13

Awk replacing file with user input

view full story
linux-howto

http://www.unix.com – this section of the awk code i have here takes file to work with from the user. the user specifies the file name from the command line and the file name is assigned to the variable $FLIST Code: awk 'BEGIN {   while((getline < "'${FLIST}'")>0)     S[$0]   FS="\n"; RS="}\n" } now, i dont want to specify a file anymore. i want the user to be able to specify a value from the command line. but i cant seem to replace FLIST with anything that isn't a file. how can i modify this so i can specify a value instead of a file? (HowTos)