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 -->
  #1 (permalink)  
Old 05-15-2008
tjmannonline tjmannonline is offline
Registered User
 

Join Date: Apr 2008
Posts: 37
remove spaces btw

filename contains:

123 4
1234 5
12345 689

i want result:
1234
12345
12345679

cat filename | awk '{print $1, $2, $3}' will get my result, but too many $$s.

sed -e 's/[ ]//g' filename will take care one space, [ ] will take 2 spaces.

is it a short way to do this ?
Reply With Quote
Forum Sponsor