You'll need to parse the file twice to get the right cube id when you encounter "<mtf>" - otherwise you're already late...
Something along these lines in awk - not as succinct as perl, but..... nawk -f king.awk myFile
king.awk:
Hi friends, :)
In a shell script i found the following if condition.
echo -n "Which version of $1 do you want to restore ('0' to quit)? : "
read desired
if ${desired:=1} -ge $index ] ; then
echo "$0: Restore canceled by user: index value too big." >&2
exit 1
fi
Can... (1 Reply)
I do have a situation where , i need to zip the log files in the directory when the file exceeds more than 10MB.
cd $ORACLE_HOME/network/log
find . -type f -name "listener_*.log" > listeners
Now i have all my *.log files listed in the listeners file
So now i need to find the size of each... (5 Replies)
Executed the following if conditions .. and got different results .
only (( )) gave correct o/p with all scenarios .
Can anybody please let me know what is the difference between and ] and ((condition)) when used with if condition.
And why each condition gave different result.
1.... (2 Replies)
hi,
I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command
Here are my simple script
After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
HI
My doubt may be basic one but I need to get it clarified..
When i use "if" condition that checks for many AND, OR logical conditions
like
if ]; then
return 0
fi
Even the if condition fails it returns as zero.. Any clue..
But if i add else condition like
if ]; ... (2 Replies)
Please help me new to shell getting error while running below in shell script
#!/bin/bash
set -x
cd /abc/def/ghi
pwd
xyz1=ghi
if
then
FAILURE_TEMP="The ghi directory has not been properly defined for this server."
echo ${FAILURE_TEMP} | /bin/mailx -s "apps copy failed"... (4 Replies)
Hello,
I want to use if condition in an expression as below:
$ORACLE_HOME is a variable something like below
/oraprod04_01/app/oracle/product/10204
Now here it is product/10204 I want to check if $ORACLE_HOME has something which has a string like /product/10* then one statement should... (4 Replies)