10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I am new to UNIX. I am working on a script where it takes the input and produces a desired output and it works fine for one instance.
Input(One Instance):
CREATE TABLE TAB1
(
COL1,
COL2
);
CREATE UNIQUE INDEX XPKTAB1
(
COL1
)TAB1;
Output:
CREATE TABLE TAB1
(
COL1,
COL2... (8 Replies)
Discussion started by: varun2327
8 Replies
2. Shell Programming and Scripting
#!/bin/ksh
for SRV in imawasp01 \
imawasp02 \
imawasp03 \
imawasp04 \
imawasp05 \
imawasp06 \
imawasp07 \
imawasp08 \
imawasp09
do
print "${SRV}"
while read PASSLINE
do
SRVNAME=`echo ${PASSLINE} | awk -F\: '{print $1}'`
LASTLOGIN=`ssh ${SRV} lsuser ${SRVNAME} | tr '... (2 Replies)
Discussion started by: port43
2 Replies
3. Shell Programming and Scripting
I'm looking at a line in a script:
&& DRROOT="/dir1" || DRROOT="/dir2" I'm trying to understand it.
Is there a "-d" command and is it seeing if /dir1 exists and, if so, set an environment variable named DRROOT to "/dir1", else set DRROOT to "/dir2" ?
Thanks,
-dog
---------- Post... (0 Replies)
Discussion started by: landog
0 Replies
4. Shell Programming and Scripting
Hi,
I have a ksh script running on AIX 5.3 which has sometimes a bizarre behaviour.
The script runs a child script like follow.
trap 'rm -f /tmp/res.log;exit 0' 2 15
run_child.sh > /tmp/res.log 2>&1
echo "run_child.sh is terminated"
next instructions...
rm -f /tmp/res.log
... (12 Replies)
Discussion started by: rivalgro
12 Replies
5. Shell Programming and Scripting
#!/bin/ksh
log=ABCl
log=EFG
log=HIJ
i=0
while <------ what is the meaning of ($i - lt 3)
do
print ${log}
(( i=i+1 ))
done (1 Reply)
Discussion started by: Bperl1967
1 Replies
6. Shell Programming and Scripting
Hello Everyone,
I'm still trying to grasp many concepts in .ksh scripting, one of them being variables inside loops. My problem is the following:
* I'm trying to set a variable inside a while read loop to reuse it outside of said loop. My lines are the following :... (13 Replies)
Discussion started by: jimmy75_13
13 Replies
7. Shell Programming and Scripting
Hello
I am trying to send an email when a .KSH script is run on an AIX Machine.
This email will only include a subject line that is made up of variables from within the script, and is as follows:
CURRENT_DATE=`date +%Y%m%d`
TIME=`date`
ADMIN="myname@domain.com"
date
block ()
{
... (4 Replies)
Discussion started by: jimbojames
4 Replies
8. Shell Programming and Scripting
Guys,
I am new in awk , I face problem while i try to use for loop in awk,
I am using ksh, i am trying to set a for loop which runs as man times as the records in a file , the for loop like for(a=1;a<=5;a++) is working in my awk script but the one i need is not working :wall:
for example
... (8 Replies)
Discussion started by: djahmed
8 Replies
9. Shell Programming and Scripting
I am trying to write a script that will allow me to train others with commands that I run manually by only allowing the exact command before continuing onto the next set of commands. Here is where I come into an issue. I have changed the directories for this post.
Software we run creates files... (2 Replies)
Discussion started by: hurtzdonut
2 Replies
10. Shell Programming and Scripting
Hi,
I have written a script that traps errors on different servers from the log files based on the current system date. The trapped errors are written to a file and file is sent as an attachment to an email.
I would like to run this script for every 2hrs. when i run the script from the second... (0 Replies)
Discussion started by: itzcoolbuddy
0 Replies