Quote:
Originally Posted by Northerner
Got the following result
cat file1.txt | while read line
while: Expression syntax.
from
#!/bin/ksh
cat file1.txt | while read line
do
JOBNAME=$(echo ${line} | awk '{print $3}')
LINE2=$(grep -w $JOBNAME file2.txt)
echo "$line $LINE2" >> file3.txt
done
|
You have to add the full path and the right name of your file.
For exemple a file in /tmp :
cat /tmp/File1 | while read line
do
JOBNAME=$(echo ${line} | awk '{print $3}')
LINE2=$(grep -w $JOBNAME /tmp/File2 | awk '{print $2 " " $3}')
echo "$line $LINE2" >> /tmp/File3
done