Monthly Archives: August 2009

How to search for a file using the "find" command in bash (not case sensitive)

find start_directory -name “*” | grep -i search_string e.g. “find . -name “*” | grep -i hobba” searches within the current directory and can return a file with name “aamr_HoBba.log” for example.

Tagged , | Leave a comment

An Introduction to linux Shell Scripting for DBAs, A Nice Tutorial by Oracle

I found this nice tutorial and would like to share it with you, it’s really useful: http://www.oracle.com/technology/pub/articles/saternos_scripting.html

Tagged , | Leave a comment

The sql_check_rw file contents in the last post

sqlplus -s “/ as sysdba” <<EOF set heading off feedback off termout off select OPEN_MODE from v\$database; exit EOF

Tagged | Leave a comment

Monitoring Oracle DB in a HACMP Active/Passive Cluster

The following script is one that I developed to be executed by HACMP every 10 seconds to make sure that the database is up and running: #!/usr/bin/bash DATE=`date +%d%m%y` # Record the time to add a time stamp to the … Continue reading

Tagged , , | Leave a comment

Remove the first character in a string in bash script

export variable= “anything_you_want” # populate the variable, this is just an example of course variable=$(echo ${variable:1}) # remove the first character in the variable echo $variable # show the new value of the variable to make sure the operation is … Continue reading

Tagged | Leave a comment