Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.shell Subject: Re: echo question Message-ID: <1991Mar08.142000.27880@convex.com> Date: 8 Mar 91 14:20:00 GMT References: <4101@bnr-rsc.UUCP> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 24 Nntp-Posting-Host: pixel.convex.com From the keyboard of simonl@bnr.ca (Simon-Cheuk Leung): : : I have a question on C-shell, if I do the following, : : set item = ( search 'find / -name "\!*" -print' ) : : I can set this item without getting any complain, but it doesn't allow me : echoing $item[2]. How can I echo the original $item[2] in this case? : (include \!*) You need to either enclose it in double quotes: echo "$item[2]" or turn off globbing with "set noglob" or at least the whining with "set nonomatch". You will lose the backslash, but that's ok. What's not ok is that you use the csh, which is a royal pain the neck, and you shouldn't be using it for didly squat. I know "should" is a strong word that we "shouldn't" use, but so be it. Bill Joy has a plane of hell reserved all to himself because of the csh. Use a real shell, or perl, but break yourself of the csh sickness before it becomes terminal. --tom