Hi readers,
I have two shell scripts running on linux machine.
Both the scripts do the following task
- Connect to DB
- Create temp files
- run select statement on table
- write the rows returned on temp file
Sample code is below
Both the shell scripts do the same process but create separate temp files based on where clause. two files have difference of only where clause.
How can I combine the process and generate temp files using 1 shell script.
I tried replicating the code and inserting in 1 shell file but only 1 temp file was generated with "where clause 1".
Hi Folks,
I have two scripts that are used to start and stop services these scripts are at the location /opt/app/tre , so that start.sh internally starts the components and stop.sh internally stop all the components, now rite now if I have to stop the services then i need to go first the... (9 Replies)
I have a file like this consisting of blocks separated by > of two number X and T
>
10 0
13 5.92346
16 10.3106
19 13.9672
22 16.9838
25 19.4407
28 21.4705
31 23.1547
34 24.6813
37 26.0695
40 27.3611
43 28.631
46 29.8366
49 30.9858
52 32.0934
55 33.1458 (6 Replies)
Hello gurus,
I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script.
i m looking for something like this
call 3.1;
If 3.1 = "complete" then
call 3.2;
if 3.2 = ''COMPlete" then
call 3.3;
else
exit
The... (1 Reply)
Hi ,
Following are the two scripts :-
Script 1)
#!/bin/sh
cp file.log file.log.1
Script 2)
#!/bin/sh
diff file.log file.log.1 > DIFFERENCE.log
cp file.log file.log.1
grep "ERROR" DIFFERENCE.log
if ; then
echo "1"
else
echo "0"
fi (1 Reply)
I have a text file . Format of text file.
djss:xd:78:isdev:"test server"
this type of row. (approx 30).
I want to display like that
1. djjs@msxd testserver 2. xjfd@msxd devserver
3. 4
select any one from above choice : 1... (5 Replies)
I would like to seek some expertise of all our AIX experts on board.
1) I would like know how to get a return exit code of a command. I found that there are exist code for each and every command run in AIX but I just can't get the return code from my scripts.
A=`cp /home/abc/abc.txt... (7 Replies)
Hello I am new to shell scripting. Below are 2 scripts which I need to combine in to single script.Can some experts guide me how to proceed?
#!/bin/bash
grep "2443" /f/log/s/heduler.log | grep 2443> /tmp/memorydump
exec 6<"/tmp/memorydump"
read -u 6 data
if
then
echo "IN THEN" <... (4 Replies)
Hi, I am not experienced in shell scripts, I hope someone can give some hint for the following problem
I have html file like this
<html>
<body>
Some stuff
More stuff
<pre>
A
B
</pre>
Still more stuff
And more
<pre>
C
D
</pre>
Additional stuff
</body> (2 Replies)