I'm unable to detect the cause of error.
Please help point me out and it's corrective action. I'm a beginner and so this will be a great help to me.
mapping.txt:
test1 hello
test2 world
My Sh file: parameter 1 = hello
a= cat mapping.txt | grep $1 | awk '{print$1}'
echo $a
## Extracting Dump name
b=$(ls -ltr /home/oracle/$a/$1*.dmp | awk '{print $9}' | tail -1)
I'm getting test1 as echo, but i'm unable to substitute in /home/oracle/$a/$1*.dmp script
output: ls: /home/oracle//hello*.dmp: No such file or directory
What change should i do to let it substitute as: /home/oracle/test1/hello*.dmp