Madra,
Not sure if you did get a solution to the initial post. If I understand correctly you have two resource groups (rgA and rgB).
rgA - is to be capable of failover to from NodeA -> NodeB
rgB - should remain on NodeB and never move
The easiest way to achieve this is to change the...
Is the "[^[:alnum:]]" notation for specifying a field seperator valid for Solaris?
echo "AA!BB,CC DD" | nawk -F "[^[:alnum:]]" '{print $3}'
The above works on AIX however not on Solaris
Mike,
Are you sure variable assignment within printf works?
$ cat test.awk
nawk 'BEGIN {
LENGTH=6
printf("%0${LENGTH}d\n", "123")
printf("%08d\n", "123")
}'
$ ./test.awk
{LENGTH}d
00000123
I didn't get the result you suggested.
Thanks
I have a requirement to increment a number prefixed with variable leading zeros and print the output.
Input:
0012
000005
000099
0000100
Desired output:
0013
000006
000100
0000101
I'm fine if the output is required to be say 5 digits in length i.e using printf "%05\n" - the variable length per...
How would I use awk in an interactive manner? That is, prompting for user input...doing a calculation and re-prompting?
BEGIN {
while (ARGC<3) {
print sqrt(ARGV[1])
}
}
I looking for somthing like this however i don't know how to re-read in user input or an exit statement to break the loop.
Is it possible to do a calculation and check if the result is a whole number?
For example:
(a) 2004/4 = 501
(b) 2007/4 = 501.75
I'd like to do the above division and do something in the case of (a) and something else in the case of (b).
Any ideas please?
Is it possible to execute a SQL query across multiple servers remotely? I'd like to issue the below on multiple remote severs:
/usr/bin/su - oracle
export ORACLE_HOME=/u01/oracle/product/9.2.0.5
export ORACLE_SID=${sid}
/u01/oracle/product/9.2.0.5/bin/sqlplus ' /nolog'
connect / as sysdba...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.