Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
sogod
Explorer

error: "/bin/bash^M: bad interpreter: No such file or directory"

hello, 

I tried to export logs using bash script on R80.40. (in expert mode)

I've got the error: "/bin/bash^M: bad interpreter: No such file or directory"

Can you please help in solving the issue.
 
The script looks like this:
 
#!/bin/bash
    FILES="$FWDIR/log/*.log"
    for f in $FILES; do
           name=$(basename $f)
           echo "convertig"
           fwm logexport -n -p -i $f -o "/home/admin/logsFolder/$name.txt"
    done
 
best regards,
zoei
0 Kudos
1 Reply
Dror_Aharony
Employee
Employee

This means it was created in a Windows env & not converted to Unix/Linux format.

simply run from CLI: dos2unix <script_name>


Are you sure you want to be using the fwm logexport, can you detail your purpose?

 

0 Kudos