2014-03-27から1日間の記事一覧

対象のディレクトリの拡張子一覧を取得する方法と便利コマンド少々

bashの奥は深い。 ext-list.sh #!/bin/bash dir=`pwd` list=`find ${dir} -type f -perm 755` # not = ! # list=`find ${dir} -type f ! -perm 755` for file in $list do filename=`basename $file` ext=${filename##*.} ext_list=("${ext_list[@]}" ${ext}…

対象のディレクトリの拡張子一覧を取得する方法と便利コマンド少々

bashの奥は深い。 ext-list.sh #!/bin/bash dir=`pwd` list=`find ${dir} -type f -perm 755` # not = ! # list=`find ${dir} -type f ! -perm 755` for file in $list do filename=`basename $file` ext=${filename##*.} ext_list=("${ext_list[@]}" ${ext}…