Looping/Repetition in Batch files


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Looping/Repetition in Batch files
# 1  
Old 12-09-2005
Question Looping/Repetition in Batch files

Hi All,
I'm just new to UNIX, does anyone know how to create a batch file in UNIX that does the following routines:
1.) process multiple files in a directory
in DOS, I set my sample input file as: set INPUTFILE=%1
in UNIX>> ????

2.) every file to be processed by executing a program (maybe a class file in UNIX)
in DOS >> for %%i in (*.txt) do D:\WINDOWS\system32\cmd.exe /v:ON/c C:\RPM\DosBatch\RPM.bat %%i
in UNIX >>????

3.)also has a trapping error wherein I can create a log file
in DOS >> %ERRORLEVEL% > error.log
in UNIX >> ????


Thanks!
gLeN EMAIL ADDRESS REMOVED
# 2  
Old 12-10-2005
This is thread violates

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.
(10) Don't post your email address and ask for an email reply. The forums are for the benefit of all, so all Q&A should take place in the forums.


Mods, please close this.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Looping through Files

Hi all , I am new on this forum . I have to face a particoular implementation issue and I need some help . Requirement : I need to read a particoular file (an xml file) and after reading it I need to call an Oracle Stored Procedure passing the content of the file as paramenter , in order... (3 Replies)
Discussion started by: Kolas79
3 Replies

2. Shell Programming and Scripting

Need to exclude .NFSxxx files in clear old files batch script

I am new to Shell Scripting and need some help. The following batch job has been failing for me due to the .nfsxxx files in use. I need to know how to modify the following script to exclude the .nfsxxx files so this batch job will not fail on me. I have done lots of googling and keep coming back... (2 Replies)
Discussion started by: kimberlyg2007
2 Replies

3. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

4. Shell Programming and Scripting

looping through files

I am writing a ksh which has to load 7 files(.dat files) from input directory into oracle tables using sql loader. The process has to take each file at a time and once if it is loaded succesfully using sql loader into oracle tables then the process has to pick next file and load it into oracle... (2 Replies)
Discussion started by: vpv0002
2 Replies

5. Shell Programming and Scripting

Help Looping through files in Vi Script

I am trying to write a script that loops through all the files in the current directory that end in '.slg.gz' and runs a parser on each file. Here is my code: #!/bin/bash FILES_HOME = 'dirname $0' for i in $(ls $FILES_HOME/.slg.gz$);do ./run-feature-parser $(i) > OUTPUT.csv done ... (1 Reply)
Discussion started by: kssteig
1 Replies

6. Shell Programming and Scripting

Looping through files...

I posted this in the Solaris forum, but I don't think it's platform specific, so I'm posting it here. Here is the situation. We are a company that has been using a professional publishing system, the software is called "ProType". It runs on Solaris 2.4, however it is no longer supported and we... (6 Replies)
Discussion started by: Fred Goldman
6 Replies

7. Shell Programming and Scripting

Looping on a list of files...

This isn't working for multiple files. It works for one file though. exists1=$(ls | grep gspp*) for FILES in $exists1 do echo "Loading $exists1" ... (23 Replies)
Discussion started by: lazerfoursix
23 Replies

8. Shell Programming and Scripting

Looping/Repetition in Batch files

Hi All, I'm just new to UNIX, does anyone know how to create a batch file in UNIX that does the following routines: 1.) process multiple files in a directory in DOS, I set my sample input file as: set INPUTFILE=%1 in UNIX>> ???? 2.) every file to be processed by executing a program... (2 Replies)
Discussion started by: kimpot7268
2 Replies

9. Shell Programming and Scripting

Help looping through files, please...

Okay... I've solved one problem. Here's the next. I'm writing a script file that needs to go through a directory and list all files in that directory. I'm using TCL/TK. I figured out how to go through the directory and how to loop through it, but I ran into a little problem. ... (2 Replies)
Discussion started by: kapolani
2 Replies

10. Shell Programming and Scripting

looping files

Hi, I have a file a.lst which lists all files. as a.dat b.dat c.dat I want to process these files mentioned in the list file in a loop. Say I want to display only the first line of all the files a.dat , b.dat, c.dat. How can I go about it? Please help. (5 Replies)
Discussion started by: dharmesht
5 Replies
Login or Register to Ask a Question