メモ。ちょっと必要だったので・・・。 デフォで出来ないのかなぁ。
12345678910111213141516171819
#!/bin/bashif [ "$1" = "" ]; then echo "usage : touch_all {dir_name}" exitfifor file in `ls -Ra $1`doif [ "$file" = "." ] || [ "$file" = ".." ]; then continuefiif expr "${file}" : ".*:$" >/dev/null; then dir=${file%%:}/else touch $dir$filefidone;