Hi all,
can you plz check whether the below code is correct & some inputs.
I need to read the below file and process it.
input :
can you plz check whether the below code is correct & some inputs.
I need to read the below file and process it.
input :
Code:
/home/ibm/var.txt
urgent
not urgent
not needed.
Code:
#!/usr/bin/ksh
VAR=/home/ibm/var.txt
if [[ -s $VAR ]]
then
cat $VAR | while read VAR
do
if [[ $VAR = 'urgent' ]
then
echo "process";
else
echo "not process";
fi
done