The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
counting a list of string in a list of txt files Pep Puigvert UNIX for Dummies Questions & Answers 4 08-15-2008 04:55 PM
Best way to list a directory's contents? bbilheimer UNIX for Dummies Questions & Answers 6 02-05-2008 10:05 AM
Comparing contents of files rrs Shell Programming and Scripting 3 04-03-2007 09:08 PM
list contents of directory carl_vieyra UNIX for Dummies Questions & Answers 3 01-30-2007 03:24 PM
Message trying to list contents of directory sallender UNIX for Dummies Questions & Answers 1 10-19-2005 09:22 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-20-2008
snakernetb snakernetb is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 5
Unhappy list files and contents

I have a group of getOSinfo.out files that I would like to list the filename and then its contents out to. I can do it for each one individually, but would prefer to do it all in one shot and have one large file that has all of the oslevels and filenames. I am not very handy with scripts, so I was wondering if anyone had a script that did this already. It is on AIX so ksh is prefered, but I can probably tweak most things to work. I would like the output to look something like this:

Filename.out
content line 1
content line 2

You get the idea, I am still in my scripting infancy so please bare with me. Thanks for any help with this.

BTW this is what I was using, I know I will need a much more robust set of commands than this.

ls *.GetOSInfo.out > OSInfo.out | cat *.GetOSInfo.out >> OSInfo.out
 

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 09:34 PM.


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