echo "Test: are there subdirectories in /orainst/oracle/cfgtoollogs/dbca/cdb ?" ls $(pwd)/*/ > /dev/null 2>&1 if [ $? == 0 ]; then echo "Yes" export PDBDIR=`ls -d */ | awk -F '/' '{ print $1 }'` grep ERROR --exclude-dir=${PDBDIR} * | egrep -v $ignorelist else echo "No" grep ERROR * | egrep -v $ignorelist fiThe code above is based on a finding in this post on Stack Overflow.
Minimalistic Oracle contains a collection of practical examples from my encounters with Oracle technologies. When relevant, I also write about other technologies, like Linux or PostgreSQL. Many of the posts starts with "how to" since they derive directly from my own personal experience. My goal is to provide simple examples, so that they can be easily adapted to other situations.
Friday, February 9, 2024
Script snipplet to test for subdirectories
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment