[comp.sys.sgi] csh and psh

SCHDAVZ@YaleVM.YCC.Yale.Edu (Dave Schweisguth) (05/27/91)

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.
 _____________________________________________________________________________
/                                                                             \
|   Dave Schweisguth               5386 Yale Station           203-436-2694   |
|   schdavz@yalevm.ycc.yale.edu    New Haven, CT 06502-5386                   |
\_____________________________________________________________________________/

msc@ramoth.esd.sgi.com (Mark Callow) (05/30/91)

In article <91147.080436SCHDAVZ@YaleVM.YCC.Yale.Edu>, SCHDAVZ@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@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc
"Spirits of genius are always opposed by mediocre minds" - Albert Einstein