Reuti <[email protected]> writes:
> The file was created on Windows and the lines end in CR/LF, the ? represents
> the CR.
>
> There is a tool dos2unix (or use an `sed` command) to remove these characters
> from the script file.
I use JSV to catch that:
# Check for the common case of Windows-style line endings.
# (NB requires fixed jsv_include.sh.)
# The line endings lose particularly with the #! shell line.
cmd=$(jsv_get_param CMDNAME)
case $(jsv_get_param b) in y|yes) binary=y;; esac
# Fixme: Are Mac-style endings relevant?
# NB literal ^M below!
[ "$cmd" != NONE -a "$cmd" != STDIN -a "$binary" != y ] &&
[ -f "$cmd" ] &&
head -n1 "$cmd" | grep -q '^M$' &&
# Can't use multi-line messages, unfortunately.
jsv_reject "\
Script has Windows-style line endings; transfer in text mode or use dos2unix"
--
Community Grid Engine: http://arc.liv.ac.uk/SGE/
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users