Register
It is currently Thu Jul 24, 2014 4:42 am

Bash error (amateur)


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Thu Dec 20, 2012 3:47 pm   

Joined: Wed Dec 23, 2009 11:07 am
Posts: 1
I have a small script (not finished) where I am receiving a "bash: /home/brian/bin/orderprn.sh: /bin/bash^M: bad interpreter: No such file or directory" error. The file is executable. All of my other script have the same interpreter.
I ran the script line by line through the CLI and it works of course.

What am I missing here?

#!/bin/bash
shopt -s nullglob
cd /home/brian/orders
for f in *.prn
do
echo "working on $f"
FILENAME=$f
STR=$(echo `expr index "$FILENAME" "."`)
done
exit


Top
 Profile  
 PostPosted: Sat Dec 22, 2012 8:26 am   
User avatar

Joined: Fri Jul 22, 2011 5:39 pm
Posts: 46
Brian:

Don't edit Linux files in Windows. :)
http://www.cyberciti.biz/faq/sed-remove ... -appleosx/


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP