2020-07-02から1日間の記事一覧

初歩のシェルスクリプトで遊ぶ[ファイルのリネームツール、のようなもの?_(2)]

whileとforのパイプ繋ぎ for.sh #!/bin/bash stdin=`cat -` for LINE in ${stdin} ; do expr ${LINE} + 1 #echo $(( ${LINE} + 1 )) done while.sh #!/bin/bash while read LINE ; do expr ${LINE} + 1 #echo $(( ${LINE} + 1 )) done $ time seq 0 1300 | .…