Quantcast
Channel: Root gets permission denied when executing commands from script but not from shell - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 2

Answer by roaima for Root gets permission denied when executing commands from script but not from shell

$
0
0

The underlying problem is the parse error on this line:

hash1=$(md5sum dbPath/testdb.sql) | awk '{print $1}'

which should almost certainly be

hash1=$(md5sum dbPath/testdb.sql | awk '{print $1}')

You can check for errors like this at https://shellcheck.net


Viewing all articles
Browse latest Browse all 2

Trending Articles