![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AIX SAN configuration problems/oddity | praxis22 | AIX | 1 | 06-27-2007 05:47 PM |
| VSFTP oddity | Spetnik | UNIX for Dummies Questions & Answers | 7 | 04-28-2004 03:58 PM |
| Su Password Oddity | jacobsa | UNIX for Dummies Questions & Answers | 4 | 05-30-2002 08:50 AM |
| Textual oddity | Jubba | UNIX for Dummies Questions & Answers | 3 | 03-25-2002 12:55 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
TR squeeze oddity
I discovered that where 'tr -s' works as expected on grepped input, it appears to completely fail on dig results.
I am not sure if this is because of some sort of non posix compliancy, or what. Here is what I did: The command below works as expected, squeezing all repeated spaces to a single space: ps -ef | grep mc | tr -s \ | cut -d\ -f2,8-9 When i try this on dig, it fails absolutely, as do all possible variances of squeeze in regards to whitespace I could figure out: dig subkeys.pgp.net | tr -s \ dig subkeys.pgp.net | tr -s \040 dig subkeys.pgp.net | tr -s "040" dig subkeys.pgp.net | tr -s [:blank:] dig subkeys.pgp.net | tr -s [:space:] dig subkeys.pgp.net | tr -s '[:space:]' (none of the above squeeze any type of whitespace that I could tell) I ended up doing this,. which has the desired effect: dig subkeys.pgp.net | tr -t [:space:] \ | cut -d \ -f5 Can anyone explain why squeeze doesn't seem to work on dig results? Thanks for any help. I appreciate the education. Bruce D. Meyer |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|