Hi,<br>
<br>
<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">: Bad interpreter: No such file or directory<br><br>At the top, I have:<br>#!/bin/bash
<br><br>I tried:<br>#!/bin/sh<br><br>But that got the same results. The permission bits are:<br><br>-rwxr--r-- root root<br><br>I'm running it as root.<br><br>No probs, I have fixed that, just re-wrote it, and it seemed to work. I have
<br>another problem now though:</blockquote><div><br>
<br>
You didn't create the file in Notepad on a Windoze box did you ? 
SOmetimes Windoze puts odd (non-printing, so invisible) characters into
text files.<br>
<br>
You can generally fix that by running dos2unix on the file (dos2unix myFile.txt)<br>
 </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Tar says it can't "stat" ls, says there's no such file or directory.<br>
<br>here's the script:<br><br>#!/bin/bash<br><br>cd /var/ftp/backup;<br><br>for file in ls<br>do {<br>tar cf /home/backup/$file.tar.tar $file/<br>} done</blockquote><div><br>
Try:<br>
for file in `ls .`<br>
do {<br>
tar cf /home/backup/$file.tar.tar $file/<br>
} done<br>

<br>
(note the backticks.  These cause the shell to execute the command and capture the output)<br>
<br>
Actually, the new 'politically correct' way to do this would be:<br>
<br>
for file in $( ls . )<br>

do {<br>

tar cf /home/backup/$file.tar.tar $file/<br>

} done<br>
 </div>HTH<br>
<br>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">What is the problem?<br><br>Cheers,<br><br>Chris Norman<br><br></blockquote></div><br>