Last active
July 9, 2019 00:29
-
-
Save shnhrtkyk/8f8dd28d76a9f3f972913aff10189bd7 to your computer and use it in GitHub Desktop.
ディレクトリ内のファイルを引数を渡してpythonで処理する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
dir_path="/path/*" | |
dirs=`find $dir_path -maxdepth 2 -type f -name *.txt` | |
for dir in $dirs; | |
do | |
echo $dir | |
echo ${dir%.*}.npz | |
# ここから実行処理を記述 | |
python /path/to/script/convert.py $dir ${dir%.*}.npz ${dir%.*}_ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment