Joining program to one batch file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Joining program to one batch file
# 1  
Old 10-10-2006
Joining program to one batch file

I created a batch file (./mybatch) that need to run few programs
at a sequnece but i need a command like the DOS call command in order
to return to the main batch file to proceed the sequence

example:

cd /dir1/path/dir2
invoke program1
cd /dir3/path2/
<--- i want to return here
# 2  
Old 10-10-2006
Assume you have the "programs" p1, p1, p3
Code:
cd path1
nohup p1 > p1.log &
cd path2
nohup p2 > p2.log &
cd path3
nohup p3 > p3.log
wait

At least this is what I think you are asking.
# 3  
Old 10-10-2006
Can you elaborate?

Thanks for the answer !

I understand that you run the programs at bg but why do you write
them as files ?
why the last one is not at bg? Smilie
And why is the wait instruction at the end ?

Last edited by eynkesef; 10-10-2006 at 09:10 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File joining and sorting

Hi, I'm having some trouble joining these two files for some reason. Here is what they look like: head * I'm using: join -a 1 -1 2 -2 1 f1 f2 -t, > joinfile.out but unfortunately nothing is happening. I did notice that I was having trouble sorting f1 and I'm not sure why using:... (6 Replies)
Discussion started by: verse123
6 Replies

2. Shell Programming and Scripting

Joining lines in a file - help!

I'm looking for a way to join lines in a file; e.,g consider the following R|This is line 1 R|This is line 2 R|This is line 3 R|This is line 4 R|This is line 5 what i want to end up with is R|This is line 1 R|This is line 2 R|This is line 3 R|This is line 4 R|This is line 5 so... (15 Replies)
Discussion started by: Storms
15 Replies

3. Shell Programming and Scripting

bash - joining lines in a file

I’m writing a bash shell script and I want to join lines together where two variables on each line are the same ie. 12345variablestuff43212morevariablestuff 12345variablestuff43212morevariablestuff 34657variablestuff78945morevariablestuff 34657variablestuff78945morevariablestuff... (12 Replies)
Discussion started by: Cultcha
12 Replies

4. UNIX for Dummies Questions & Answers

Joining lines of a text file using GAWK

sir... am having a data file of customer master., containing some important fields as a set one line after another., what i want is to have one set of these fields(rows) one after another in line.........then the second set... and so on... till the last set completed. ... (0 Replies)
Discussion started by: KANNI786
0 Replies

5. Shell Programming and Scripting

joining multiple files into one while putting the filename in the file

Hello, I know how to join multiple files using the cat function. I want to do something a little more advanced. Basically I want to put the filename in the first column... One thing to note is that the file is tab delimited. e.g. file1.txt joe 1 4 5 6 7 3 manny 2 3 4 5 6 7 ... (4 Replies)
Discussion started by: phil_heath
4 Replies

6. Windows & DOS: Issues & Discussions

get filename from absolute path in batch program

hey im writing batch program for the first time and i have almost finished it the only problem is that i want to extract basename from absolute path for eg : if my first argument is c:\abcd\xyz\temp.txt then i want only temp.txt in variable. and how do i extract some part from string for eg... (1 Reply)
Discussion started by: zedex
1 Replies

7. UNIX for Dummies Questions & Answers

joining variable to the end of a file name

hi all i have a directory which contain file 20060101-66666-09-08-0.tif 20060101-77777-11-12-0.tif 20051231-54221-66-55.tif 20051231-54221-66-44.tif as you can see the name of the two last files is shorter then the first ones i want to take all the files with the shorter name and to add to... (7 Replies)
Discussion started by: naamas03
7 Replies

8. Shell Programming and Scripting

Joining 2 lines in a file together

Hi guys, I've got a log file which has entries that look like this: ------------------------------------------------------------------------------- 06/08/04 07:57:57 AMQ9002: Channel program started. EXPLANATION: Channel program 'INSCCPQ1.HSMTSPQ1' started. ACTION: None. ... (3 Replies)
Discussion started by: m223464
3 Replies

9. Shell Programming and Scripting

Joining lines in log file

Hi, I need to develop a script to join multiple three lines in a log file into one line for processing with awk and grep. I looked at tr with no success. The first line contains the date time information. The second line contains the error line. The third line is a blank line. Thanks, Mike (3 Replies)
Discussion started by: bubba112557
3 Replies
Login or Register to Ask a Question