Subject: | |
From: | |
Reply To: | Emerson, Tom |
Date: | Thu, 26 Jun 2003 08:47:23 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> -----Original Message-----
> From: Mark Wonsil [mailto:[log in to unmask]]
>
> > But when I do, I get this message (under ALL users including root):
> > /disc2/edi/script> ./orasn script interpreter "/usr/bin/sh"
> not found
> > sh: ./orasn: not found.
>
> OK, I found the problem ... The syntax is ... #! followed by ...
> interpreter pathname ... followed by newline.
> A newline. Hmm. We'll, I'm modifying this script using ...
> This script has no extension and so there's CRs on the end
> of the line. Good enough to screw up the first line
> Any thoughts on a sed script to remove CRs from a group of
> text files? ;-)
Go no farther than your own shell
There is a common/standard program called "tr" that translates characters, and can take "\" escaped C-style placeholders for non-printing characters
Per the "man tr" page, you probably want:
tr \r \n <file1 >file2
(you may need a "-c" parameter -- read the man page carefully...)
Wrap this command in your fileset-handling-logic of your choice :)
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|