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
CPU, memory and disk stats ungnown.admin SUN Solaris 6 05-14-2008 04:00 PM
system stats rocker40 AIX 2 04-14-2008 07:24 AM
display filename with date pstanand Shell Programming and Scripting 1 03-28-2008 05:35 AM
can I use ps to log overall system stats. thebytegrill AIX 8 10-07-2007 02:20 AM
I/O Stats Metrics LivinFree UNIX for Advanced & Expert Users 0 06-06-2006 09:38 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 04-12-2006
Registered User
 

Join Date: Apr 2006
Posts: 2
Display filename and wc stats

I'm just learning UNIX and I'm trying to do the following:

Write a script called details.bash that, for each file in the working directory, prints the filename, the # of lines, and the # of words to to some output file, like this:
filename1 73 431
filename2 5 21

It's probably a stupid question, but again I'm just learning.
Reply With Quote
Forum Sponsor
  #2  
Old 04-12-2006
Registered User
 

Join Date: Mar 2006
Posts: 106
Here...

It does not deserve a script! Use the commands in one line, that's it.

ls | xargs wc -wl

Get "UNIX Essentials and UNIX Core" DVD if you have questions like that.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:37 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