Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!ur-tut!ur-valhalla!moscom!de From: de@moscom.UUCP (Dave Esan) Newsgroups: net.unix Subject: Re: passing command line arguments to awk Message-ID: <753@moscom.UUCP> Date: Fri, 19-Sep-86 12:01:30 EDT Article-I.D.: moscom.753 Posted: Fri Sep 19 12:01:30 1986 Date-Received: Sat, 20-Sep-86 01:49:34 EDT References: <198@comp.lancs.ac.uk> Distribution: net Organization: MOSCOM Corp, E Rochester, NY, USA Lines: 19 > > I surrender -- is it possible to pass command line arguments to awk? > > If so - how. While I'm at it how about doing the same thing to sed. I don't use awk that much, but I'm sure its possible. As for sed: Suppose that you want to substitute A for B. Your command could be: (executable file) A B, where executable file contains the line: sed "s/$1/$2/" editingfilename. There are many other combinations, which of course is the wonder that is UN*X. rochester \ David Esan | moscom ! de ritcv/