echo コマンドで標準入力を受け取る
1050 ワード
こんにちは。
echo コマンドで標準入力を受け取るには、cat コマンド1の助けを借りると良いようです。
$ echo "hello" | echo $(cat)
$ echo "hello" | echo \"`cat`\"
"hello"
-
これはよく使われる手法です(例:標準入力も受け取れるシェルスクリプト(catコマンド使用)) ↩
Author And Source
この問題について(echo コマンドで標準入力を受け取る), 我々は、より多くの情報をここで見つけました https://qiita.com/kkdd/items/4484c421e3540eadd39d著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .