AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
Expand all | Collapse all

smit.script installp question

  • 1.  smit.script installp question

    Posted Fri November 23, 2018 01:10 PM

    Originally posted by: jeffb120374


    Hello, I've done some research and need an explanation of what I'm seeing in my smit.script for root installing the Bash shell:

    eval /usr/lib/instl/sm_inst installp_cmd -a -Q ${ARGS:+$ARGS}
    preprocess_inuwpar -d '.' -f 'bash ALL  @@R:bash _all_filesets' '-p'   '-g' '-X'  '-G'   '-Y'   '-M'  -k '_all_wpars'

     

    What does the ${ARGS:+$ARGS} mean, specifically the ":+"? Thank you in advance.


    #AIX-Forum


  • 2.  Re: smit.script installp question

    Posted Wed November 28, 2018 02:52 PM

    Originally posted by: AncientAIXer


    That is a shell parameter substitution.  What it means is that if $ARGS is set and not null, evaluate the expression as $ARGS (the second occurrence), otherwise evaluate as a null string.  I'm not sure why they use it here, but it is useful in usages such as:

    print ${X:+$Y}

    so that if $X is set, then print $Y.


    #AIX-Forum