The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
sth wrong of gcc zither AIX 2 01-02-2008 01:57 AM
What’s wrong with the following? vrn UNIX for Dummies Questions & Answers 8 03-19-2006 09:09 PM
where have i gone wrong? Blip Shell Programming and Scripting 3 01-28-2004 04:43 PM

Closed Thread
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
  #1 (permalink)  
Old 02-05-2008
cleansing_flame's Avatar
cleansing_flame cleansing_flame is offline
Registered User
  
 

Join Date: Nov 2007
Location: NYC
Posts: 37
what is wrong with this tr -d?

here is my command in bash shell on Mac OS X tiger:

history | tr -d emacs

here is what I get:

hitory | grp "" | tr -d ""
hitory | grp "" | tr -d """"
hitory | grp "" | tr -d ''
hitory | grp "" | tr -d ''
hitory | grp "" | tr -d ''
hitory | grp "" | tr -d ''
hitory | grp "" | tr -d ''
hitory | grp "" | tr -d ''
hitory | grp "" | tr -d ''
hitory | grp "" | tr -d ``
hitory | grp "" | tr -d ""
hitory | grp "" | tr -d ""
hitory | grp "" | tr -d ""
hitory | grp "" | tr -d ""

sadly it removed all ascii characters contained within "emacs", any help appreciated
  #2 (permalink)  
Old 02-05-2008
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,229
You have misunderstood the use of tr, which will interpret the laetters as a list oc characters to delete. If I have understood what you want correctly, replacing the tr with this should work:

Code:
sed 's/emacs//'
  #3 (permalink)  
Old 02-05-2008
cleansing_flame's Avatar
cleansing_flame cleansing_flame is offline
Registered User
  
 

Join Date: Nov 2007
Location: NYC
Posts: 37
thanks, but sadly that didn't work either
  #4 (permalink)  
Old 02-06-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,763
reborg means to pipe history into sed:
Code:
history | sed 's/emacs//'
What are you trying to do, exactly, not how you think it should be done?
Closed Thread

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 12:30 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