From: utzoo!decvax!cca!FC01@USC-ECL@sri-unix Newsgroups: net.unix-wizards Title: the first line Article-I.D.: sri-unix.4212 Posted: Fri Nov 19 05:26:20 1982 Received: Sat Nov 20 05:30:17 1982 From: FC01 Date: 16 Nov 1982 1058-PST If you want to use the first line as a general purpose shell script invoker, simply write a filter to extract the first line (first n lines) if it (they) has (have) # as its (their) first character, and invoke the appropriate program (programs successively) on the rest of the file. This would look like: #! /u/fc/bin/filtername arbitrary program name with switched, etc #! optionally more of the same #! ... #! last in the list of successive pipes to be xmitted through rest of file If you like, simply use a shell script for the filter by piping the file through sed with the proper incantations, otherwise write a 40line program to do exactly what you want. Fred -------