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
result of ftp MeeraNair UNIX for Dummies Questions & Answers 6 05-29-2008 09:27 AM
display result from user input thms_sum Shell Programming and Scripting 13 02-01-2008 05: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 10:43 PM
FTP command result nymus7 IP Networking 1 08-08-2005 05:01 PM
Display result one page at a time nickaren UNIX for Dummies Questions & Answers 4 09-10-2003 01:15 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-30-2008
melanie_pfefer melanie_pfefer is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 234
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
  #2 (permalink)  
Old 04-30-2008
vijay_0209 vijay_0209 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 52
hi

try this
echo "showrev -p is:`showrev -p | wc -l`"
  #3 (permalink)  
Old 04-30-2008
melanie_pfefer melanie_pfefer is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 234
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
  #4 (permalink)  
Old 04-30-2008
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,116
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....
Sponsored Links
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 06:58 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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