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.
ユーザーごとにスクリプトを実行する必要があります。そのユーザーのシェルがファイル内に変更され/script/script1ました。/etc/passwdスクリプトを実行すると、SHELLが/ script/script1として取得されます。
/script/script1
/etc/passwd
ああ、スクリプトとpasswdエントリが表示されたので、何が起こっているのか理解できたと思います。semは、シェルを使用してコマンドラインを実行しようとしています。semの前にprintenvを実行すると、SHELL = home / bkup:/ script / script1であることがわかりますか?
その場合は、semを実行する前に、行にSHELL = / bin / bash(または/ bin / shなど)をエクスポートするだけです。
これが機能しない場合は、printenvの出力を表示してください。