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

    Tue 23 Apr 2024 @ 11:00 AM (EDT)

    East US: What's New in R82

    Thu 25 Apr 2024 @ 11:00 AM (SGT)

    APAC: CPX 2024 Recap

    Tue 30 Apr 2024 @ 03:00 PM (CDT)

    EMEA: CPX 2024 Recap

    Thu 02 May 2024 @ 11:00 AM (SGT)

    APAC: What's new in R82

    Tue 23 Apr 2024 @ 11:00 AM (EDT)

    East US: What's New in R82

    Thu 25 Apr 2024 @ 11:00 AM (SGT)

    APAC: CPX 2024 Recap

    Tue 30 Apr 2024 @ 03:00 PM (CDT)

    EMEA: CPX 2024 Recap

    Thu 02 May 2024 @ 11:00 AM (SGT)

    APAC: What's new in R82
    CheckMates Events