Processing batches of files at a time

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Processing batches of files at a time
# 1  
Old 04-29-2010
Processing batches of files at a time

Hi

I would like to run my script to process as many as 50 files at a time.

Currently my script is being called like so:

Code:
 
./import.sh -f filename

so I want to call my script in this way and it must execute every file in the directory

Code:
 
/var/local/dsx/import

how can I do this?
# 2  
Old 04-29-2010
Code:
for filename in /var/local/dsx/import/*
do
  /path/to/import.sh -f $filename
done

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

System processing time scriptshell

I am new to scripting in Linux. I have captured traffic generated between a client and FW (server). I would like to measure the time each packet remains in the server (processing time). I have the key idea, but I am not sure how to implement this and write a script does what I need. Each arriving... (3 Replies)
Discussion started by: eronad
3 Replies

2. Shell Programming and Scripting

Processing 1 match string from grep at a time

hi all, i have a few log files with dates that are incorrrect (please don't ask me why). i need to add 2852 days, 16 hours, and 21 minutes (246471660 seconds) to each of these dates to correct them. i need to write to new "test2.txt" file that corrects the dates found by grep and yet have it... (4 Replies)
Discussion started by: cilantrocado
4 Replies

3. UNIX for Dummies Questions & Answers

Real time processing

Hi Not sure if this can be achieved by unix , but still would like to know if there is any way by which I can do the below given logic cat sam1 > out1 cat sam2 > out2 when either one of this finished the the next file shd be written in that file, meaning cat sam3 >> out1/out2... (2 Replies)
Discussion started by: Sri3001
2 Replies

4. IP Networking

Processing time

I want to know the processing time taken by a node.example suppose a node ges a rreq...then it searched through it's table to see if it has a fresh route or not.I want to know this search time...is their any function available for doing this in ns2 or in glomosim.Any help is highly appreciated ... (1 Reply)
Discussion started by: prashantgolu
1 Replies

5. UNIX for Dummies Questions & Answers

What command to time processing of code

What command do I run to see how long it takes the CPU to process a line of code? (1 Reply)
Discussion started by: glev2005
1 Replies

6. Shell Programming and Scripting

Calculate processing time

I have a log file which has a lot of output but I am interested in the following Processed records: 34749; Processed files: 67445 Job run run at Thu May 6 03:00:01 PDT 2010 Job finished at Thu May 6 12:22:14 PDT 2010 So I would like to have the output as Total time Records Files... (2 Replies)
Discussion started by: gubbu
2 Replies

7. Shell Programming and Scripting

Running batches of files at a time from a script

Hi I have a script that performs a process on a file. I want to know how to include a function to run a batch of files? Here is my script #!/bin/bash #---------------------------------------------------------------------------------------------------------------------- #This... (2 Replies)
Discussion started by: ladyAnne
2 Replies

8. Shell Programming and Scripting

Sorted list by time of spu processing

Hi, i have to make a command in unix system which make a sorted list by cpu time (not %cpu ). If the application exists more than a time I would like to keep only one copy. Could you help me please ??? P.s : I am trying --> ps aux --sort -%cpu | uniq but I understand that is wrong (5 Replies)
Discussion started by: petros55
5 Replies

9. Shell Programming and Scripting

Time based Processing of the Scripts

Any one can tell me how can i execute the processes for every 10 min.Actually iam having 3 Processes for every 10 min i want to run these 3 Process,one process at every 10 min. If any of the process is busy i just want to execute the free one. first 10 min execute P1 next 10 min execute P2... (3 Replies)
Discussion started by: krk_555
3 Replies

10. Shell Programming and Scripting

Need to know abt script that invokes batches and get d log files if batches failed

hi , I need to know commands to be used in the script to invoke batches in order from other scripts and then run those batches,and how to take those logs of those batches which fails........If anyone give me a better idea to complete this entire task in a single script... (5 Replies)
Discussion started by: gopimeklord
5 Replies
Login or Register to Ask a Question