눈바래다

#!/bin/ksh

 

#if [ ! $# -eq 1 ]

#then

# echo [USAGE] ar.sh JOBNAME

# echo please try again

# exit 1

#fi

 

while true

do

 

echo ""

echo "STOP this script : Type [exit]"

echo "INPUT SEARCH JOBNAME : ex)jobname"

read JOBNAME

#echo $JOBNAME

 

if [ $JOBNAME = "exit" ]

then

 echo "STOP this script"

 exit 1

fi

 

nawk -F: 'BEGIN{ format="%-15s %-45s %-10s %-15s %-10s %-15s \n"

printf format, "JOBNAME","업무명" , "업무담당자", "Mobile","2차담당자","Mobile"

printf format, "--------------","----------------------","---------","----------","------","----------"}

/'$JOBNAME'/ { printf format, $2, $1, $3, $4, $5, $6 }' AR.dat

 

done