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 コマンドを実行しようとしていますが、「|」を回避できません。パイプ文字
rsh -l user machine "echo "PORTS = 123|456|789" >> conf.cfg"
取得:
bash: 456 >> conf.cfg: No such file or directory
bash: 789: command not found
PORTS = 123|456|789リモートファイルにエコーする方法を教えてください。
PORTS = 123|456|789
ありがとう!
パイプと引用符をエスケープするだけです:
rsh -l user machine "echo \"PORTS = 123\|456\|789\" >> conf.cfg"