@kyanny's blog

My thoughts, my life. Views/opinions are my own.

Bash: here strings

https://en.wikipedia.org/wiki/Here_document#Here_strings

<<< でコマンドの標準入力に渡せる。

❯ sed -e 's/-/_/g' foo-bar-baz
sed: foo-bar-baz: No such file or directory

❯ sed -e 's/-/_/g' <<< foo-bar-baz
foo_bar_baz

masayuki14.hatenablog.com

yshystsj.com

www.greptips.com