csh and psh

Mark Callow msc at ramoth.esd.sgi.com
Thu May 30 08:01:24 AEST 1991


In article <91147.080436SCHDAVZ at YaleVM.YCC.Yale.Edu>, SCHDAVZ at YaleVM.YCC.Yale.Edu (Dave Schweisguth) writes:
|> Does anyone know of a reasonable way to get a csh command-line argument into
|> a psh script? Specifically, I'd like to have a csh alias to a PostScript
|> program which can use arguments following the alias. I can generally find a
|> workaround, but it'd be nice to have a clean method.

In your psh script simply refer to $1, $2 etc. wherever you want to refer
to a command line argument.  Make sure the first line of the script is

#!/usr/NeWS/bin/psh

and make it executable.  Then if you execute a script "foo", for example,
as "foo bar", anywhere your PostScript references $1 it would be replaced
by "bar".
-- 
>From the TARDIS of Mark Callow
msc at ramoth.sgi.com, ...{ames,decwrl}!sgi!msc
"Spirits of genius are always opposed by mediocre minds" - Albert Einstein



More information about the Comp.sys.sgi mailing list