73 ¹ø ±Û: [Shell] example of get next args |
±Û¾´ÀÌ: »êÀÌ
[ȨÆäÀÌÁö]
|
±Û¾´³¯: 2004³â 03¿ù 15ÀÏ 01:24:31 ¿ù(»õº®) |
Á¶È¸: 3038 |
#!/bin/sh
#
# -- example of get next args
argc=$#
i=1
while [ "$i" -le "$argc" ] ; do
eval args="\$$i"
case "$args" in
-c)
i=$(($i+1))
eval cfg="\${$i}"
shift
;;
-f)
i=$(($i+1))
eval file="\${$i}"
shift
;;
esac
i=$(($i+1))
done
echo "cfg = $cfg , file = $file"
exit 0
|
ÀÌÀü±Û : [Shell] find | xargs cmd ¿Í find | cmd
´ÙÀ½±Û : [MySQL] /etc/my.cnf example
|
from 61.254.74.228
JS(Redhands)Board 0.4 +@
|