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 でこの方法でコマンドを使用できるかどうか疑問に思っています。
命令しようpwd
pwd
comm="pwd" 変数を持っていて、それをプログラムのどこかで使用したいとしますが、それを使用すると、実際の pwd コマンド出力が得られます。これは可能ですか?
comm="pwd"
はい、サブコマンドをバッククォート (` 文字) で囲みます。
comm=`pwd`