I did write two scripts, where one has part simple code of the other ones and several comments in:
user : oracle both files are of oracle. both files have the execution clearance on : chmod +x fpc.sh && chmod +x bpc.sh
script that works: fpc.sh
#!/bin/bash
#
# author bla bla bla
#
ORACLE_SID=MyOracleSid
PATH=/app/oracle/admin/DB/$1
TARGHET="\/app\/oracle\/admin\/DB\/$1"
chmod -R 755 $PATH
find $PATH -type f -exec egrep 'ORACLE_SID' {} \; -print
script that doesn't works: bpc.sh
#!/bin/bash
#
# author bla bla bla
#
ORACLE_SID=MyOracleSid
PATH=/app/oracle/admin/DB/$1
#
#TARGHET="\/app\/oracle\/admin\/DB\/$1"
#
#
#
#
#
#
#
#
#
#
#
#
#
#
chmod -R 755 $PATH
find $PATH -type f -exec egrep 'ORACLE_SID' {} \; -print
bpc.sh gets:
chmod command not found find command not found
How is possible?
thanks for your collaboration,
chmod
andfind
– Tagwint Jun 05 '18 at 18:10bosh
since bosh has a builtinfind
program based onlibfind
. – schily Jun 05 '18 at 18:15./bpc.sh ":$PATH"
– glenn jackman Jun 05 '18 at 18:23PATH
has a very specific use for the shell, changing it has consequences to find commands. – Jun 05 '18 at 18:32