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
need help with counting of files then pass number to variable adshocker Shell Programming and Scripting 2 06-04-2009 06:51 AM
Validating input based on fixed number of fields Dipali UNIX for Dummies Questions & Answers 6 02-10-2009 04:17 AM
Reading specific contents from 1 input files and appending it to another input file sksahu Shell Programming and Scripting 5 01-14-2009 06:09 AM
appending variable number of files dr46014 UNIX for Dummies Questions & Answers 1 04-19-2008 03:12 PM
maximum number of input on solaris marcello UNIX for Dummies Questions & Answers 1 03-23-2005 06:06 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 08-27-2009
sunmatrix sunmatrix is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 2
variable number of input files

Hi all,

I'm an extremely newbie with unix/perl. I have a perl script that I need to run on a variable number of input files (i.e., I have to run the perl script on each file, but from run to run, I have a different list of files that need to be put through this script).

I think this can be done in a shell script, but I don't even know where to begin. I can type each command over and over with the file names, but that is no different than doing it at the command line.

For example, say I have test1.dat, test2.dat, ... test20.dat.. I'd like to do something like:

for i = 1 to number of files
parse.pl test(i).dat
end

Can this be done?

Thanks for any help!
Tina
 

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 12:57 AM.


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