home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / bit / listserv / aixl / 2115 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.3 KB  |  52 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!NOBIVM.BITNET!SYS85001
  3. Organization: Norwegian School of Management (BI)
  4. Message-ID: <930125.092228.CET.SYS85001@NOBIVM>
  5. Newsgroups: bit.listserv.aix-l
  6. Date:         Mon, 25 Jan 1993 09:22:28 CET
  7. Sender:       IBM AIX Discussion List <AIX-L@PUCC.BITNET>
  8. From:         Knut Winsnes <SYS85001@NOBIVM.BITNET>
  9. Subject:      Re: Q: csh and brackets in a script
  10. In-Reply-To:  Message of Fri, 22 Jan 1993 19:54:13 -0500 from <seb@DRAPER.COM>
  11. Lines: 39
  12.  
  13. On Fri, 22 Jan 1993 19:54:13 -0500 Steve Bacher said:
  14. >>#!/bin/csh -f
  15. >>######
  16. >>set tolower="tr '[A-Z]' '[a-z]'"
  17. >>echo "abcABC"  $tolower
  18. >
  19. >Change the last line to read:
  20. >
  21. >echo "abcABC" "$tolower"
  22. >
  23. >The double quotes will suppress file globbing.
  24. >
  25. > - seb
  26. I tried the following:  (! is used as vertical bar in this mail only)
  27.  
  28. #!/bin/csh -f
  29. ######
  30. set tolower="tr '[A-Z]' '[a-z]'"
  31. echo "abcABC" ! "$tolower"
  32. echo "abcABC" ! "tr '[A-Z]' '[a-z]'"
  33. echo "abcABC" ! tr '[A-Z]' '[a-z]'
  34.  
  35. Running this with csh -x gives:
  36. set tolower=tr '[A-Z]' '[a-z]'
  37. echo abcABC
  38. tr '[A-Z]' '[a-z]'
  39. tr '[A-Z]' '[a-z]': Command not found
  40. echo abcABC
  41. tr '[A-Z]' '[a-z]'
  42. tr '[A-Z]' '[a-z]': Command not found
  43. echo abcABC
  44. tr '[A-Z]' '[a-z]'
  45. abcabc
  46.  
  47.  
  48. Should this (the translation) work in all 3 cases...?
  49.  
  50. regards
  51. Knut
  52.