Bye Bye Moore

PoCソルジャーな零細事業主が作業メモを残すブログ

2014-06-09から1日間の記事一覧

readコマンドで標準入力から変数を代入する

readは標準入力から変数を代入するコマンドです。 $ read Hoge <<< 'as' $ echo ${Hoge} asそもそもは標準入力と連動して動くものです。 以下のようなbashスクリプトを組み #!/bin/bash ## hoge.sh # single 'read' statement can set multiple variables. e…