Search Results

Search: Posts Made By: amar1208
1,515
Posted By RudiC
Insert user name, date/time, and/or PID into the...
Insert user name, date/time, and/or PID into the file name to make it unique. Place it under a user's home directory. Assign sequential numbers.
3,819
Posted By Chubler_XL
Simple typo in variable name in your expression,...
Simple typo in variable name in your expression, try:

PRIM_SEQ=(200 100)
STDBY_SEQ=(50 20)
echo "====================================="
echo "PRIMARY_SEQUENCE of"
echo...
3,819
Posted By rdrtx1
try: #!/bin/sh PRIM_SEQ=(`some sql code`) ...
try:
#!/bin/sh

PRIM_SEQ=(`some sql code`)
STB_SEQ=(`some sql code`)

c=0
for i in ${PRIM_SEQ }
do
(( x = PRIM_SEQ[c] - STB_SEQ[c] ))
echo $x
(( c = c + 1 ))
done
4,613
Posted By RudiC
The "compound command" including the break is not...
The "compound command" including the break is not needed if you break out of the loop anyhow:
do echo $CHOICE
[ ! $CHOICE ] && echo "You have selected invalid Database"
breakBut you can also run...
4,613
Posted By RudiC
man bash: Try [ ! $CHOICE ] && {...
man bash:


Try
[ ! $CHOICE ] && { echo "invalid entry"; break; };
4,613
Posted By RudiC
Try $ ps -eo args= | awk -F"_" '/pmon/ &&...
Try
$ ps -eo args= | awk -F"_" '/pmon/ && !/ASM/ {print $3}'
abc1
abc2
abc3
abc4
abc5
4,613
Posted By rbatte1
Rather that ps -ef | grep pmon | grep -v grep |...
Rather that ps -ef | grep pmon | grep -v grep | awk ...... might I suggest ps -ef | grep [p]mon | ....... instead. The square brackets are a pattern match that has only one option, but because there...
1,541
Posted By MadeInGermany
Please use the code tags for your code! The...
Please use the code tags for your code!
The remote code after the pipe does not work. You can do some escape effort.
Or run it locally:
STANDBY_CONF=$(
ssh $COB_HOST /bin/sh << EOF | awk -F:...
1,541
Posted By Don Cragun
You are setting PRIMARY_CONF in your shell script...
You are setting PRIMARY_CONF in your shell script and your script is seeing the value that you are setting. You are setting STANDBY_CONF in a shell that you are running on COB_HOST; not in the shell...
1,541
Posted By balajesuri
I think your set -x gives pretty clear idea that...
I think your set -x gives pretty clear idea that "srvctl config database...." is not having any output. So $STANDBY_CONF is empty.
May be you want to check by running this command directly on...
1,541
Posted By RudiC
Try consistently putting spaces around [, ], and...
Try consistently putting spaces around [, ], and =.
1,410
Posted By RudiC
Try awk '/Services/ {match ($0,...
Try
awk '/Services/ {match ($0, /[A-Za-z_]*COB[A-Za-z_]*/); print substr ($0, RSTART, RLENGTH)}' file
NEPAL_COB
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 01:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy