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



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux