I like to know how to remove all white space from pipe 1 and take the contents over to pipe 3. Note, test2.txt file always changes on the hour and I'm hunting down the pattern in test1.txt file. I only know the basic of UNIX and my kung fu is not that strong.
awk 'NR==2' test2.txt | pg test1.txt | grep -e "trying to print NR==2 info here."
pipe 1: awk 2nd line from test2.txt file.
pipe 2: opening text1.txt file.
pipe 3: trying to grep -e the contents of pipe 1 and failing miserably.
I've read this post a few times now, and I have more questions than answers.
I really don't understand what you want.
And what do pipes have to do with kung fu?
Let's take what you've given us:
awk 'NR==2' test2.txt | \ # print line 2 of test2.txt
pg test1.txt | \ # pipe line 2 of test2.txt into pg for reasons unknown
grep -e "trying to..." # grep for what?
Where does removing whitespace fit into this and what does that have to do with pipes?
Like I said, I don't really understand what you're trying to do.
Here the whole thing. The information stored in file PDSNinfo.txt varies in length on the hour and I want to avoid any issues when I perform a grep. Also I have no idea how to move variable �NR==1� over to "print NR==1".
Empire State Building, thanks. When I remove the "awk 'NR==1' PDSNinfo2.txt" and "awk 'NR==2' PDSNinfo2.txt" and vi the file on what to "grep -e" it works fine.