09-05-2005
3,216,
33
Join Date: Mar 2005
Last Activity: 4 September 2020, 7:11 AM EDT
Location: classification algos
Posts: 3,216
Thanks Given: 19
Thanked 33 Times in 30 Posts
Hi,
This is just a vague sample of the above req mentioned.
not thoroughly tested.
echo "give the first input."
read input1
echo "give the second input."
read input2
line=`grep $input1 <filename> | grep $input2 <filename>`
output1=`echo $line | cut -f1 -d"|"`
if [ $output1 = $input1 ]
then
output1=`echo $line | cut -f2 -d"|"`
fi
output2=`echo $line | cut -f3 -d"|"`
if [ $output2 = $input2 ]
then
output2=`echo $line | cut -f4 -d"|"`
fi
echo "output1: $output1"
echo "output2: $output2"
Please let me know if my understanding and proceeding with the req was correct or not.