5

How to print the next line by searching with different patterns in AIX server?

view full story
linux-howto

http://www.unix.com – Hi, I am having an '.xml' file with 'n' number of lines and also having another file with '.txt' format contains values which i want to search. Now I want to print the next line with the pattern which i am searching in '.xml' file. And the loop has to repeat for different patterns which are present in '.txt' file. the logic which i used is Code:   while read line   do     grep -h -e  $line -A 1  file1.xml >> values.txt   done < file2.txt the above code is working in Linux server. Where I tried the same code in AIX server, it thrown below er (HowTos)