Wednesday, November 30, 2011

calling two parameters from a file using bash script

Advertisements

this script explains how to call two parameters or arguments or values from a file using bash script in a for loop

file_path :  path to the file
i and j are the variables for the calling values


for i in `cut -d: -f2 file_path`
do
j=`cat file_path | grep $i | awk {'print $1'} | cut -d: -f1`
echo $i $j
done

No comments:

Post a Comment

Be nice. That's all.