The UNIX and Linux Forums  

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



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-02-2008
bdmeyersc bdmeyersc is offline
Registered User
  
 

Join Date: May 2008
Location: South Carolina
Posts: 2
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0