Web lists-archives.com

Re: Bash seg faulting?




On 1 June 2017 at 18:01, Andy Hall wrote:
>
> Here is a strange one.   I have two scripts, conv.sh and conv.bat that do the same thing: scan the current directory for
> .doc files and convert them to .docx files.  Here are the two scripts.
>
> $ cat conv.sh
> #!/bin/bash
>

Try running "cat -e conv.sh" to see if you have dos line endings, e.g.
CR LF, instead of unix line endings, e.g. LF only.

If you do, run "dos2unix conv.sh" or "d2u conv.sh" to fix the line
ending problem. Check that your editor can create files with unix line
endings, and preserves unix line endings.

HTH
Doug


-- 
Doug Henderson, Calgary, Alberta, Canada - from gmail.com

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple