If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > What if command line arguments not specified

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-11-08, 05:13
jayawant01 jayawant01 is offline
Registered User
 
Join Date: Jun 2008
Posts: 40
What if command line arguments not specified

Hi can any one help me with this.....

The below pasted extract is part of the script which is invoked from another script..

gsdgp_init() {
typeset CALLER=${SCRIPT}
typeset SCRIPT=${SCRIPT}.gsdgp_init
typeset DBSPEC=${1:?${SCRIPT}BSPEC}

gpd_terminate
i am not specifying any argument at command prompt so from where will the value of variable DBSPEC will come .....
Reply With Quote
  #2 (permalink)  
Old 06-12-08, 01:53
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
man ksh
Code:
                        | parameter set and not null | parameter set and null
     ${parameter:-word} | substitute parameter       | substitute word
     ${parameter-word}  | substitute parameter       | substitute null
     ${parameter:=word} | substitute parameter       | assign word
     ${parameter=word}  | substitute parameter       | substitute parameter
     ${parameter:?word} | substitute parameter       | error, exit
     ${parameter?word}  | substitute parameter       | substitute null
     ${parameter:+word} | substitute word            | substitute null
     ${parameter+word}  | substitute word            | substitute word

                                 | parameter unset
     ${parameter:-word}          | substitute word
     ${parameter-word}           | substitute word
     ${parameter:=word}          | assign word
     ${parameter=word}           | assign null
     ${parameter:?word}          | error, exit
     ${parameter?word}           | error,exit
     ${parameter:+word}          | substitute null
     ${parameter+word}           | substitute null
Reply With Quote
  #3 (permalink)  
Old 06-13-08, 07:03
jayawant01 jayawant01 is offline
Registered User
 
Join Date: Jun 2008
Posts: 40
can u please explain little more ???
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On