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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 01-30-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 645
I think I follow what you mean...
If you need something to appear in the forums as you've typed it, surround it with CODE tags (the "#" symbol in the editor).

/dev/null is just a garbage can, it means that I want the output from grep to go nowhere as we don't need it. You can get a similar effect by using grep with the -q option but that only wroks on certain versions of grep.

If your fields are exactly 8 chars wide, we can change the cut call in the code like so:
Code:
cut -d ' ' -f 1,2
Becomes
Code:
cut -c 1-16
(ie, instead of cutting fields 1 and 2 seperated by spaces, we cut chars 1-8 and 9-16)
Reply With Quote