Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • sess_server.sql Oracle
  • move_arch_files.ksh Linux/Unix
  • Locktree.sql Oracle
  • Insert cause enqueue locks Oracle
  • cur_sql.sql Oracle
  • Jai Shree Ram Oracle
  • First Entry in RAC Oracle
  • Good notes on Oracle Events Oracle
  • For Search and replace unix command. Linux/Unix
  • handling filenname with space Linux/Unix
  • Building Our Own Namespaces with “Create Context” Oracle
  • mutex in Oracle 10.2.0.2 or Oracle 10g Oracle
  • sqlnet.ora paramters Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • PLSQL Table Syntax 1 Oracle

Logic to chech # of parameters command line parameters

Posted on 05-Oct-2006 By Admin No Comments on Logic to chech # of parameters command line parameters

# Exit if no first parameter $1.

if [ -z “$1” ]

then

echo “Usage: check_parms.ksh

<#_days> (where value is > 100)”

exit 99

fi

# Exit if no second parameter $2.

if [ -z “$2” ]

then

echo “Usage: check_parms.ksh

<#_days> (where value is > 100)”

exit 99

fi

# Exit if parm is not greater than 100.

tmp=`expr $2` # Convert string to number.

if [ $tmp -lt 101 ]

then

echo

echo “Argument two is less than 100.

Aborting Script.”

echo

exit 99

fi

Linux/Unix, shell

Post navigation

Previous Post: oracle tips… from http://www.bijoos.com/oracle/douknow.htm
Next Post: Some useful Unix Commands

Related Posts

  • Removing Ctrl-M from end of line using vi Linux/Unix
  • send email from unix mailx with attachment. Linux/Unix
  • To Find Orphan OS processes. Linux/Unix
  • Search and replace editor command in vi Linux/Unix
  • Removing first line Linux/Unix
  • Some OS level threshold for performance. Linux/Unix

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • How to set Processes Parameter Oracle
  • ORA-3136 Oracle
  • Vivek Tuning for Row Locks. Oracle
  • To see mem usage and CPU usage system wide. Linux/Unix
  • Running select from V$ views from remote server Linux/Unix
  • normal maintenance for exp-imp and renaming table Oracle
  • get_vmstat_solaris Oracle
  • Rman Notes -1 Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme