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

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 Solution

Accepted Solutions
Dror_Aharony
Employee Alumnus
Employee Alumnus

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?

 

View solution in original post

1 Reply
Dror_Aharony
Employee Alumnus
Employee Alumnus

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?

 

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events