To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags
```text
and
```
by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
You didn't mention what operating system you're using (which always helps when you ask for help in this forum), but if you your version of grep includes a -A option (which is not required by the standards), an easy way to do what you seem to want would be:
grep -A1 '"SIT"' *.xml |grep 'https'
An alternative would be:
awk '/"SIT"/+1 && /https:/' *.xml
As always, if you want to try the awk command on a Solaris/SunOS system, change awk to /usr/xpg4/bin/awk or nawk .
I mistakenly thought /"SIT"/+1 was selecting the line following a line containing "SIT" and the /https:/ would be true on those lines that contained https: causing that line to be printed.
The following seems to correctly do what I was trying to do:
With the sample input you showed us, exactly what output are you trying to produce?
If the input you showed us was incomplete or not representative of your actual input, please provide a new example clearly explaining what you are trying to do AND show us the exact output you are trying to produce from that expanded example.