Remove DOS CR/LFs (^M)
Remove DOS style CR/LF characters (^M) from UNIX files using: sed -e ‘s/^M$//’ filename > tempfile The newly created tempfile should have the ^M character removed
Remove DOS style CR/LF characters (^M) from UNIX files using: sed -e ‘s/^M$//’ filename > tempfile The newly created tempfile should have the ^M character removed
If you set “stty erase ^H” on unix prompt and it works fine on unix prompt. But not working on SQLPLUS then you need to put “stty erase ^H” in .kshrc file as following. -> pwd /home/oracle oem.localdomain:OEMDB:/home/oracle -> more .kshrc stty erase ^H oem.localdomain:OEMDB:/home/oracle ->
Following statement will be used to change default shell to /bin/ksh for oracle user. [root@oem ~]# chsh -s /bin/ksh oracle Changing shell for oracle. Shell changed. [root@oem ~]#
use the following: :g/^$/d
echo “script execution starts at `date`” echo “COMFORT_SPACE=$COMFORT_SPACE” echo “ARCH_DEST=$ARCH_DEST” echo “ALERT_LOG=$ALERT_LOG” ARCH_SPACE=`df -k $ARCH_DEST | tail -1 | awk ‘{print $5}’ | sed ‘s/%//g’` echo “ARCH_SPACE=$ARCH_SPACE” STDBY_LAST_RECOVERED_FILE=`grep “Media ” $ALERT_LOG |grep -v grep|grep “arch” | tail -1 | sed -e ‘s#^.*/##g’ ` echo “STDBY_LAST_RECOVERED_FILE=$STDBY_LAST_RECOVERED_FILE” STDBY_LAST_RECOVERED_NUMBER=`grep “Media ” $ALERT_LOG |grep -v grep|grep “arch” | tail…
Read More “remove archfiles only when it is applied to DR rm_archfiles.sh” »
/oracle/scripts/rm_archfiles.sh “/db9/archlog” “90” “/oracle/admin/TESTDB/bdump/alert_TESTDB.log” #!/bin/sh RUNNING=`ps -ef|grep rm_archfiles.sh|grep -v grep|wc -l` if [ $RUNNING -gt 2 ] then echo “Exiting !!! Total $RUNNING occurence of rm_archfiles.sh are running at `date`” exit fi
ARCH_DEST=$1 COMFORT_SPACE=$2 ALERT_LOG=$3 NOTIFY_LIST=dbaoracle@1800flowers.com
kill all processes from user name atsscript on solaris. pkill -9 -u atsscript
#!/bin/ksh LOGFILE=/export/home/oracle/paresh/mylog.log NOTIFY_LIST=me@pvmehta.com while true do echo “Reading Time : `date` n” >> ${LOGFILE} echo “Following Files are currently copying” >>${LOGFILE} ls -rlt /db*/oradata/800JPOE/*.dbf | tail -2 >>${LOGFILE} echo “Out of 116 files, `ls -rlt /db*/oradata/800JPOE/*.dbf | wc -l` files copied so far” >> ${LOGFILE} echo “df -k /800JPOEARCH” >> ${LOGFILE} df -k /800JPOEARCH >>…
find the runnung process’s environment