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
how can i replace "(", "\" "+" in a file mail2sant Shell Programming and Scripting 3 04-22-2008 08:10 PM
Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" iBot UNIX and Linux RSS News 0 01-04-2008 12:00 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-19-2007 10:52 PM
"sed" to check file size & echo " " to destination file jockey007 Shell Programming and Scripting 6 11-13-2007 06:00 PM
No utpmx entry: you must exec "login" from lowest level "shell" peterpan UNIX for Dummies Questions & Answers 0 01-18-2006 01:15 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #8  
Old 04-26-2007
Registered User
 

Join Date: Jan 2007
Posts: 28
Is it feasible..?

Hi Percy,
I wonder why the command
Code:
sed '/hashcode/ d' logfile > temp ; mv -f temp logfile
wont be useful..!

Is that because it takes time to perform 'sed' and 'mv' operations. But in this case, you can type a single command and relax

BTW, if u have perl installed, I can suggest one more command..

Code:
perl -i -ne 's/^.*hashcode.*//; print if/\S/;' logfile
One shortcoming of this command is that it will remove any other blank lines in the file, if present.

Is the command(s) suggested feasible?

Thanks
Srini

Last edited by srinivasan_85; 04-26-2007 at 10:00 PM. Reason: Adding some more details
Reply With Quote
Forum Sponsor
  #9  
Old 04-27-2007
Registered User
 

Join Date: Jan 2007
Posts: 13
Perl is banned around here by the powers that be.

As for the sed command - yes, this would be good, if I fancy messing around with a 2048 char hashcode
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0