birdman
Moderator
Could you post a copy of the file (you'll need to make a zip file of it) here as an attachment?Still the exact same![]()
Could you post a copy of the file (you'll need to make a zip file of it) here as an attachment?Still the exact same![]()
Could you post a copy of the file (you'll need to make a zip file of it) here as an attachment?
That's a DOS text file.I am leaving all the text in it as is when i run the file.View attachment 56283
That's a DOS text file.
IF you've copied that back to your PC by FTP to attach it to the email, please do it again but using a binary transfer, so that I get an exact copy of what is on the box.
It's also missing the "#!/bin/sh" line at the start (which won't actually stop it running, but does make it more obvious that it's an actual shell script).

.... so you've confirmed the file on your hd51 is DOS format, not unix.
Notepad++ ..... Use option Edit/EOL conversion to sort it out.
nb very last line has no EOL at all.
That would remove the last two error lines (but leave you with an empty outfile file).
Well all scripts should start with a "#!" line, as the rest of that line says which interpreter to use to run the script. Historically there only was /bin/sh, so that gets used by default (or if it starts with ": ", which is actually the comment character is sh).I removed the "#!/bin/sh" myself, as in one of my other scripts that was preventing it from running, having said that, i have tried this script with and wthout "#!/bin/sh" and the results are the same.
They are deleted after creating the output file. Which is why you need to ensure you create empty ones at the start, since their absence may cause an error.will these files be overwritten every time the script runs? or will they accumulate
Well all scripts should start with a "#!" line, as the rest of that line says which interpreter to use to run the script. Historically there only was /bin/sh, so that gets used by default (or if it starts with ": ", which is actually the comment character is sh).