more runcda.sh
if [ $(sed -n 's/.*\(ParallelGCThreads=[0-9]*\).*/\1/p' $1_dr) ]; then
echo "ParallelGCThreads Found with Value"
else
echo "ParallelGCThreads Not Found - Add !!"
fi
$ ./runcda.sh output.log
./runcda.sh: test: argument expected
ParallelGCThreads Not Found - Add !!
Why am i getting the bold error and how can i get rid of it ?
if [ "$(sed -n 's/.*\(ParallelGCThreads=[0-9]*\).*/\1/p' $1_dr)" ]; then
Note that the way you have this written, your script will say ParallelGCThreads Found with Value even if there are no digits following the equal sign. If you want to require at least one digit to be present, try:
if [ "$(sed -n 's/.*\(ParallelGCThreads=[0-9][0-9]*\).*/\1/p' $1_dr)" ]; then