Find the answer to your Linux question:
Results 1 to 2 of 2
Hi Guyzzz, [ ! -x $name ] && { .........} Is this the different notation for if statement like if [ .... ] then fi Please give me some inputs.. ...
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Location
    Chennai
    Posts
    6

    Red face [ ! -x $name ] && { .........} is different notation if statement in script?

    Hi Guyzzz,


    [ ! -x $name ] && { .........}

    Is this the different notation for if statement like

    if [ .... ] then fi


    Please give me some inputs..


    thanks
    Raghu

  2. #2
    Linux Newbie Sangal-Arun's Avatar
    Join Date
    May 2006
    Location
    Gurgaon, India + Denver Colorado USA
    Posts
    101
    Subshells --- see curly brackets and scoping. { ... } is used for running something inside the same/parent shell instead of creating a new subshell/child shell.

    For if-then-else-fi see Author's Home page (Mendel Copper Advance Bash Scripting)
    Brgds,

    ARUN SANGAL
    SCM: 1- 720 251 9962
    Email: sangal.ak04@gmail.com
    Email: sangal_ak04@yahoo.com

Posting Permissions

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