Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Posts
    40

    Unanswered: 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 .....

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    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

  3. #3
    Join Date
    Jun 2008
    Posts
    40
    can u please explain little more ???

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •