Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!bu.edu!xylogics!samsung!rex!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!xanth!xanth.cs.odu.edu!scott From: scott@cs.odu.edu (Scott Yelich) Newsgroups: comp.unix.wizards Subject: Re: csh programming problem Message-ID: Date: 15 Mar 90 02:26:16 GMT References: <53408@bbn.COM> Sender: news@cs.odu.edu Organization: Old Dominion University, Norfolk, VA Lines: 22 In-reply-to: ellard@bbn.com's message of 13 Mar 90 13:44:09 GMT >I am trying to write a shell script that takes several arguments and >passes them to child processes, i.e. >#!/bin/csh >foo $1 $2 ... >bar $1 $2 ... >exit 0 >which I want to have the same effect as if I had typed to the shell: >foo $1 $2 ... >bar $1 $2 ... > Unfortunately, this method does not work when $1 is something like >'a b', since $1 evaluates to the string ( a b ) without the quotes, so >foo and bar think that their first argument is 'a' and their second >argument is 'b', rather than that their first argument is 'a b'. foo "$@" bar "$@" -- ----------------------------------------------------------------------------- Scott D. Yelich scott@cs.odu.edu [128.82.8.1] After he pushed me off the cliff, he asked me, as I fell, ``Why'd you jump?'' -----------------------------------------------------------------------------