Google
  Web www.spinics.net

question about colon ":" usage in Bash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Dear all:
According to the reference document, colon, ":", in bash is used as null command and I can realize this by following example:
    if condition
    then : # Do nothing and branch ahead
    else
    take−some−action
    fi
But how about the following ex1 and ex2 mean?
Ex1: 
: ${username=`whoami`}
${username=`whoami`}

Ex2:
: $((n = $n + 1))
(( n = n + 1 ))

Appreciate your help,
vichy


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Newbies FAQ]     [Kernel List]     [Site Home]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Rubini]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Networking]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]     [DDR & Rambus]     [UNIX Filesystems]     [Linux Resources]

Add to Google Powered by Linux