/home/user1/.lsbatch/1454303769.93618.shell: line 2: ^M: command not found /home/user1/.lsbatch/1454303769.93618.shell: line 5: ^M: command not found /home/user1/.lsbatch/1454303769.93618.shell: line 8: ^M: command not found /home/user1/.lsbatch/1454303769.93618.shell: line 12: ^M: command not found /home/user1/.lsbatch/1454303769.93618.shell: line 15: ^M: command not found /home/user1/.lsbatch/1454303769.93618.shell: line 18: ^M: command not found /home/user1/.lsbatch/1454303769.93618.shell: line 21: ^M: command not found /home/user1/.lsbatch/1454303769.93618.shell: line 25: syntax error near unexpected token `do^M' /home/user1/.lsbatch/1454303769.93618.shell: line 25: `do^M'
The errors occurred when there is a lots of shell spaces left in the script and this shell file is usually caused by writing and saving the file in Windows which peppered it its own format. The only solution is to use the dos2unix utilities found in linux to solve the issue
# dostounix yourscript.sh
References:
No comments:
Post a Comment