Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!sdd.hp.com!wuarchive!uwm.edu!linac!att!ucbvax!CSUFRES.CSUFRESNO.EDU!quang From: quang@CSUFRES.CSUFRESNO.EDU (Quang Ngo) Newsgroups: comp.unix.questions Subject: Variables in csh Message-ID: <9105020702.AA06707@csufres.CSUFresno.EDU> Date: 2 May 91 07:02:53 GMT Sender: usenet@ucbvax.BERKELEY.EDU Lines: 53 1) In csh, we can have something like set a = (This is a string) echo $a[2] which prints 'is' Now, let's say I have set a = "This is a string" How do I print 'str' ? 2) Let's say I have a file 'data' which contains the following 3 lines. John 234 Bill 123 Tom 231 and a csh script 'test' #!/bin/csh -f foreach a (`cat data`) echo $a end This prints John 234 Bill 123 Tom 231 Looks like the FS (file separator) is space and/or newline, and ??? I want the FS just to be newline so that 'test' would print John 234 Bill 123 Tom 231 The question is how? I know how to take care these problems in (n/g)awk. Thanks, -Quang (quang@csufres.CSUFresno.EDU)