VxRail: Script Error: bash: ./clean_up_esrs.sh: /bin/bash^M: bad interpreter

Summary: Attempting to run a script from VxRail Manager gives the error: "bash: ./clean_up_esrs.sh: /bin/bash^M: bad interpreter: No such file or directory"

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms



When attempting to run a shell script on VxRail Manager CLI the following occurs:
 

"bash: ./clean_up_esrs.sh: /bin/bash^M: bad interpreter: No such file or directory"



Screenshot showing the script error: "bash: ./clean_up_esrs,sh: /bin/bash^M: bad interpreter: No such file or directory" 

 

Cause

When the shell script was downloaded from FTP, it was in ASCI format. The script needs converted to a BINARY in order for it to work with UNIX.

Resolution

  1. Log in to VxRail Manager using SSH with ROOT Access.
  2. Navigate to the location of the shell script and vi into it.

    Example:
vi clean_up_esrs.sh


Screenshot of script showing DOS format which will not work on VxRail Manager. 
 

NOTE: At the bottom, it should display the current format of the shell script. In this particular case, it shows that the shell script is in DOS. Keep in mind that VxRail Manager is Linux based, meaning it must be in a UNIX format.
  1. Change the format to work in BINARY. Enter in the following command within the vi session then press Enter.

 

:set ff=unix 



Screenshot showing the use of the :set ff=unix filetype command in Vi editor. 

  1. Save the file by entering the command below:
:wq!
  1. Go back into the shell script using vi to ensure that the format has been changed (Should not see DOS at bottom)
  2. Try to run shell script again which should now succeed.

    Screenshot showing the script successfully running after setting the file type. 
     

Products

VxRail, VxRail Appliance Series, VxRail Software
Article Properties
Article Number: 000025001
Article Type: Solution
Last Modified: 10 Feb 2025
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.