Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
引数を受け入れて別のコマンドに渡す bash 関数を作成しようとすると、パラメーターを正しく引用する際に問題が発生します。
次の関数を定義しています。
function cluster () { dsh -acM -- \'"$@"\'; }
このコマンドの使用法は、 のようなものを変換することcluster ls -lですdsh -acM -- 'ls -l'。
cluster ls -l
dsh -acM -- 'ls -l'
御時間ありがとうございます。