Menu

#142 startup.sh ":command not found" Fix: DOS CRLF -> UNIX LF

open
nobody
1
2007-11-25
2007-11-25
No

Software:
V-Modell-XT-Projektassistent-1.2.4.tar.gz

Expected Behaviour:
When startup.sh is executed, startup.sh itself will not cause any problems.

Current Behaviour:
When startup.sh is executed, after the program has ended you will see an error message:
user@host:dir> ./startup.sh
./startup.sh: line 2:
: command not found
user@host:dir>
The reason for this error message is that startup.sh contains illegal characters. The illegal characters are CR characters because the fileformat regarding line endings for startup.sh is DOS.

Suggested Fix:
Convert startup.sh from DOS to UNIX. Possibilities to do so:
* vi -c ':set fileformat=unix' -c ':x' startup.sh
* unix2dos startup.sh
* several more...

Further Notes:
The project could use Subversion instead of CVS for version control. In Subversion, the svn:eol-style property can be set for text files. That way, errors and regression in this field can be prevented.

Discussion

  • Christian Hujer

    Christian Hujer - 2007-11-25
    • priority: 5 --> 1
     
  • Christian Hujer

    Christian Hujer - 2007-11-25

    Logged In: YES
    user_id=465603
    Originator: YES

    Reduced priority. This is only cosmetic. The program behaviour is not influenced.

     
  • Roland Spatzenegger

    Logged In: YES
    user_id=1007773
    Originator: NO

    Check in shell scripts as binaries.

     

Log in to post a comment.