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
result of ftp MeeraNair UNIX for Dummies Questions & Answers 6 05-29-2008 06:27 AM
display result from user input thms_sum Shell Programming and Scripting 13 02-01-2008 02:34 AM
Outputting formatted Result log file from old 30000 lines result log<help required> vikas.iet Shell Programming and Scripting 5 12-02-2007 07:43 PM
FTP command result nymus7 IP Networking 1 08-08-2005 02:01 PM
Display result one page at a time nickaren UNIX for Dummies Questions & Answers 4 09-09-2003 10:15 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-30-2008
Registered User
 

Join Date: Nov 2006
Posts: 187
display the result of wc -l with words before and after the result

hello

showrev -p | wc -l

returns:
381

What to do in case I want to have this output:

number of lines returned by showrev -p is: 381

thx
Reply With Quote
Forum Sponsor
  #2  
Old 04-30-2008
Registered User
 

Join Date: Apr 2008
Posts: 35
hi

try this
echo "showrev -p is:`showrev -p | wc -l`"
Reply With Quote
  #3  
Old 04-30-2008
Registered User
 

Join Date: Nov 2006
Posts: 187
thank you.

Is there a way to get rid of the space returned by wc -l?

showrev -p returns: 338 lines

should be
showrev -p returns: 338 lines

thx
Reply With Quote
  #4  
Old 04-30-2008
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,014
Code:
echo "showrev -p is:`showrev -p | wc -l | sed 's/ *//g'`"
Edit/Delete Message
Pls use vB Codes when posting code samples and/or quoting anything. You;ve posted to these forums more than 100 times....
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:23 AM.


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