home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / question / 10900 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.2 KB

  1. Path: sparky!uunet!mcsun!uknet!acorn!ixi!ixi!pd
  2. From: pd@x.co.uk (Paul Davey)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: need script to rename uppercase filenames
  5. Message-ID: <PD.92Sep10132610@herts.x.co.uk>
  6. Date: 10 Sep 92 13:26:10 GMT
  7. References: <699@svcs1.UUCP> <1992Sep3.135042.29363@walter.bellcore.com>
  8.     <1992Sep8.022910.4634@ddsw1.mcs.com>
  9. Sender: paul@x.co.uk (Paul Davey)
  10. Organization: IXI Ltd.
  11. Lines: 14
  12. In-Reply-To: dattier@ddsw1.mcs.com's message of 8 Sep 92 02:29:10 GMT
  13.  
  14. >>>>> On 8 Sep 92 02:29:10 GMT, dattier@ddsw1.mcs.com (David W. Tamkin) said:
  15.  
  16. David> | You could also do this with a one-liner:
  17. David> | 
  18. David> |     cat $1 | tr -d '\015' > `echo $1 | tr [A-Z] [a-z]`
  19.  
  20. David> That's the third time in this thread I've seen a suggestion to cat one file
  21. David> to a pipe.  It's better to save a process and
  22.  
  23. David> tr -d '\015' < $1 > ...
  24.  
  25. But with the first example you can pipe into it when $1 is unset.
  26.  
  27. somecommand | cat $1 | tr -d '\015' > `echo $1 | tr [A-Z] [a-z]`
  28.  
  29.  
  30. Yer pays yer money and yer take's yer choc ice. 
  31. --
  32.  Regards,              pd@x.co.uk           IXI Ltd.
  33.     Paul Davey          pd@ixi.uucp          62-74 Burleigh St.
  34.                   ...!uunet!ixi!pd     Cambridge,  U.K.
  35.  "These _are_ interesting times"  +44 223 462 131      CB1  1OJ
  36.