Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie running scripts 1

Status
Not open for further replies.

unixwhoopie

Programmer
May 6, 2003
45
US
I get the following messages when I run a shell script-

rssa001_automate.sh[83]: ^M: not found.
rssa001_automate.sh[85]: ^M: not found.
rssa001_automate.sh[87]: ^M: not found.
rssa001_automate.sh[89]: ^M: not found.
rssa001_automate.sh[90]: ^M: not found.

What do the numbers indicate? and how to fix these?

thanks
 
1. numbers indicate the script line numbers where the 'problems' occure

2. you've transfered your script via ftp in binary from a M$ platform - for the future do it in 'ascii mode'

3. on you UNIX, if you have dos2unix utility, run it on the script file in question. If you don't:
tr -d '\015' < myScript >myScriptNew

4. I'd suggest changin' the nick as well ;)

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Not sure if I understood
tr -d '\015' < myScript >myScriptNew

What is 015 in this command? Also what is carriage return line feed?

Thanks
 
sleipnir214,
UNIX uses just a line-feed, not a carriage-return ;-)

//Daniel
 
You can also get rid of all ^M in a file with vi. Use these key strokes:

:
%
s
/
Ctrl v
Ctl m
/
/
g

then press Enter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top