Gitで大量のファイルの中から必要ファイルのみをaddする方法
#!/bin/bash
path=`dirname $1`
if [ ${path:0:1} == "/" ];then
cnt=${tmp:1}
else
cnt=`dirname $1`
fi
echo $path
MAX_LOOP=`echo -n $cnt | sed -e 's@[^/]@@g' | wc -c`
i=0
while [ $i -le $MAX_LOOP ];do
echo ${path%/*}
path=`echo -n ${path%/*}`
i=`expr $i + 1`
doneLast updated