home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!NOBIVM.BITNET!SYS85001
- Organization: Norwegian School of Management (BI)
- Message-ID: <930125.092228.CET.SYS85001@NOBIVM>
- Newsgroups: bit.listserv.aix-l
- Date: Mon, 25 Jan 1993 09:22:28 CET
- Sender: IBM AIX Discussion List <AIX-L@PUCC.BITNET>
- From: Knut Winsnes <SYS85001@NOBIVM.BITNET>
- Subject: Re: Q: csh and brackets in a script
- In-Reply-To: Message of Fri, 22 Jan 1993 19:54:13 -0500 from <seb@DRAPER.COM>
- Lines: 39
-
- On Fri, 22 Jan 1993 19:54:13 -0500 Steve Bacher said:
- >>#!/bin/csh -f
- >>######
- >>set tolower="tr '[A-Z]' '[a-z]'"
- >>echo "abcABC" $tolower
- >
- >Change the last line to read:
- >
- >echo "abcABC" "$tolower"
- >
- >The double quotes will suppress file globbing.
- >
- > - seb
- I tried the following: (! is used as vertical bar in this mail only)
-
- #!/bin/csh -f
- ######
- set tolower="tr '[A-Z]' '[a-z]'"
- echo "abcABC" ! "$tolower"
- echo "abcABC" ! "tr '[A-Z]' '[a-z]'"
- echo "abcABC" ! tr '[A-Z]' '[a-z]'
-
- Running this with csh -x gives:
- set tolower=tr '[A-Z]' '[a-z]'
- echo abcABC
- tr '[A-Z]' '[a-z]'
- tr '[A-Z]' '[a-z]': Command not found
- echo abcABC
- tr '[A-Z]' '[a-z]'
- tr '[A-Z]' '[a-z]': Command not found
- echo abcABC
- tr '[A-Z]' '[a-z]'
- abcabc
-
-
- Should this (the translation) work in all 3 cases...?
-
- regards
- Knut
-