The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 11-22-2008
oxoxo oxoxo is offline
Banned
  
 

Join Date: Sep 2008
Posts: 38

Code:
cat Hello.txt | egrep "That One Pattern" | awk '{print $NF}'

I have a value in that code. But i cant add it to anything. Awk has its own language so i cant change the NF variable to preform any arithmetic with other command lines...Not that i could of anyway. right?

So i used another method:

Code:
cat Hello.txt | egrep "That One Pattern" | cut -d':' -f2

That code has a value as well. How would i store it in a varaible??


Code:
Value=Hello.txt | egrep "That one Pattern" | cut -d':' -f2

har har har. But i really dont know.


-----------------------------------------------
Everybody looks cool at blacklight parties
execpt for me, because i was under the impretion
that the mustard stain came out...
------------------------------------------------