Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!oliveb!pyramid!prls!mips!hitz From: hitz@mips.UUCP (David Hitz) Newsgroups: comp.unix.questions Subject: Re: Quotiing * in Bourne shell question Message-ID: <1028@mips.UUCP> Date: Thu, 21-May-87 23:17:59 EDT Article-I.D.: mips.1028 Posted: Thu May 21 23:17:59 1987 Date-Received: Sat, 23-May-87 14:41:47 EDT References: <1040@chinet.UUCP> Reply-To: hitz@mips.UUCP (David Hitz) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 29 In article <1040@chinet.UUCP> megabyte@chinet.UUCP (Dr. Megabyte) writes: > >I want to set a shell variable equal to an asterix (*). Then use that >variable in seetting another shell variable and then finally use the >second variable as a command line with the asterix NOT being expanded, >I want it passed to the program. Here is an example: Here are three ways. No doubt there are more. This is probably the best: area="*" cmdline="echo foo '$area' bar" eval $cmdline Two more for good measure: area="'*'" cmdline="echo foo $area bar" eval $cmdline area="*" cmd_1="echo foo" cmd_2="bar" $cmd_1 "$area" $cmd_2 -- Dave Hitz UUCP: {decvax,ucbvax,ihnp4}!decwrl!mips!hitz DDD: hitz@408-991-0345