Share

Metadata Extraction Tool

Tracker: Bugs

5 Shell scripts need to be UNIX-style to execute - ID: 2084399
Last Update: Tracker Item Submitted ( mh0122 )

There seems to be an bug in the format of linux start scrips:

When I try to start extract.sh :

bash: ./metadata.sh: /bin/sh^M: bad interpreter: No such file or directory

After converting the shell scrips with the following utility I was able to
start them:

dos2unix extract.sh
dos2unix metadata.sh

--
more detailed description on:

http://www.gnulinuxclub.org/index.php?option=com_content&task=view&id=339&I
temid=49

If the file has been edited on a Windows machine it can sometimes Add CR/LF
(VM) characters on the end of each line, so #!/bin/sh becomes #!/bin/shVM
and as the ctrl-v/ctrl-m characters are special, and hidden by default on
most editors, it can create a really hard to find problem. To remove the
extra CR characters that UNIXish machines don't like, simply use the
dos2unix command:

* []dos2unix <infile> <outfile>

If your OS doesn't have dos2unix, then you can use:

* []cat <infile> | tr -d ``\r'' > <outfile>


Marc ( mh0122 ) - 2008-08-30 20:29

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.