4.2. Variable Assignment(echo -n,!,$())

1、echo -n的作用简单的说就是不换行,像java中的System.out.print("something");


    19 # In a 'for' loop (really, a type of disguised assignment):

    20 echo -n "Values of \"a\" in the loop are: "

    21 for a in 7 8 9 11

    22 do

    23   echo -n "$a "

    24 done

结果:Values of "a" in the loop are: 7 8 9 11

2、

下面这段的“!”不懂:

  


    10 a=`echo Hello!`   # Assigns result of 'echo' command to 'a'

    11 echo $a

    12 #  Note that including an exclamation mark (!) within a

    13 #+ command substitution construct #+ will not work from the command line,    14 #+ since this triggers the Bash "history mechanism."

    15 #  Inside a script, however, the history functions are disabled.

 

3、``相当于$()


     2 R=$(cat /etc/redhat-release)

4、英语生词:

disguised

naked

trailing