From 9260cbdb7fadb1abab95f064a8e1d1323ebbd477 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 13 Jul 2016 15:07:38 +0800 Subject: analyze_path.sh: update arguments and output --- analyze_path.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/analyze_path.sh b/analyze_path.sh index e39ffc0..2a9d510 100755 --- a/analyze_path.sh +++ b/analyze_path.sh @@ -47,17 +47,15 @@ analyze_path() { case "$1" in -[hH]*) echo "Usage:" - echo " `basename $0` ..." + echo " `basename $0` [ path ]" exit 1 ;; esac -echo "NAME,OI,PATH" -while [ ! -z "$1" ]; do - path="$1" - shift - name=`analyze_path "${path}" | grep '^name:' | awk '{ print $2 }'` - oi=`analyze_path "${path}" | grep '^oi:' | awk '{ print $2 }'` - echo "${name},${oi},${path}" -done +if [ -z "$1" ]; then + DIR="${PWD}" +else + DIR="$1" +fi +analyze_path "${DIR}" -- cgit v1.2.2