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では、次のように1つのコマンドに一時的な環境変数を設定できます。
LD_LIBRARY_PATH=/foo/bar myprogram
csh / tcshで同様のことを行うことはできますか?私はそれをできた
setenv LD_LIBRARY_PATH /foo/bar; myprogram; unsetenv LD_LIBRARY_PATH
、ただし、変数が持っていた以前の値はすべて失われます。
csh では、次のいずれかを試すことができますenv。
env
% env LD_LIBRARY_PATH=/foo/bar myprogram
または、サブシェル:
% (setenv LD_LIBRARY_PATH /foo/bar; myprogram)