Menu

#32 Problem with shell script

open
nobody
5
2012-12-31
2007-06-23
Somebody
No

raivis@raivis:~/Desktop/wargus-2.2.4-src/wargus-2.2.4$ sh ./build.sh -p /media/UNKNOW_X/wc/ -o /home/raivis/Desktop/wc/
: not found 27:
: not found 31:
: not found 34:
: not found 37:
: not found 40:
: not found 43:
: not found 45:
./build.sh: 47: Syntax error: word unexpected (expecting "in")
raivis@raivis:~/Desktop/wargus-2.2.4-src/wargus-2.2.4$

Discussion

  • Nobody/Anonymous

    Logged In: NO

    same problem here

     
  • Nobody/Anonymous

    Logged In: NO

    I know why this happens, in case anyone is curious.

    In linux the file contains a lot of ^M characters (i guess windows-related)

    Anyway, stripping those characters will make it work better.

    I used vi to do a replace-all, but that might not be desired..
    :.,$ s/<to-replace>//g
    where <to-replace> is CTRL-v CTRL-m

    I think a tr script works too, but when I tried it, it didn't work:

    tr -s '<to-replace>' ' ' < inputfile > outputfile

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.