Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!mips!sgi!shinobu!odin!sgihub!zola!ramoth.esd.sgi.com!msc From: msc@ramoth.esd.sgi.com (Mark Callow) Newsgroups: comp.sys.sgi Subject: Re: csh and psh Message-ID: <1991May29.220124.26826@zola.esd.sgi.com> Date: 29 May 91 22:01:24 GMT References: <91147.080436SCHDAVZ@YaleVM.YCC.Yale.Edu> Sender: news@zola.esd.sgi.com (Net News) Reply-To: msc@sgi.com Organization: Silicon Graphics Inc., Entry Systems Division Lines: 18 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