System Management

bash 스크립트에서 split 함수를 이용한 문자열 파싱

kogun82 2015. 2. 12. 10:52
$./test.sh input=/tmp

echo "input: $1 output: $2"

IN=$1

arr=$(echo $IN | tr "=" "\n")

for x in $arr
do
    echo "> [$x]"
done
반응형