「VxRail:スクリプト エラー: bash: ./clean_up_esrs.sh: /bin/bash^M: 不正なインタプリタ

Summary: VxRail Managerからスクリプトを実行しようとすると、次のエラーが発生します。 "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



VxRail Manager CLIでシェル スクリプトを実行しようとすると、次のようになります。
 

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



スクリプト エラーを示すスクリーンショット:  

 

Cause

シェルスクリプトがFTPからダウンロードされたとき、それはASCI形式でした。スクリプトをUNIXで動作させるには、BINARYに変換する必要があります。

Resolution

  1. SSHとROOTアクセス権を使用してVxRail Managerにログインします。
  2. シェルスクリプトの場所に移動し、そこにviを実行します。

    Example:
vi clean_up_esrs.sh


VxRail Managerでは機能しないDOS形式を示すスクリプトのスクリーンショット。 
 

メモ: 下部に、シェルスクリプトの現在の形式が表示されます。この特定のケースでは、シェルスクリプトが DOSであることを示しています。VxRail ManagerはLinuxベースであるため、 UNIX 形式である必要があります。
  1. BINARYで動作するように形式を変更します。viセッション内で次のコマンドを入力し、Enterを押します。

 

:set ff=unix 



Viエディターでの:set ff=unixファイルタイプ コマンドの使用を示すスクリーンショット。 

  1. 次のコマンドを入力して、ファイルを保存します。
:wq!
  1. viを使用してシェルスクリプトに戻り、形式が変更されていることを確認します(下部にDOSは表示されません)
  2. シェルスクリプトを再度実行しようとすると、成功するはずです。

    ファイル タイプを設定した後にスクリプトが正常に実行されたことを示すスクリーンショット。 
     

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.