Array indexing in both shells starts at zero. An array element is accessed with a subscript, which is an integer-valued expression enclosed inside a pair of brackets. You don't declare the maximum size of a shell array; you simply assign values to elements as you need them. The values ...
双括号([[)与单括号具有基本相同的功能,但它是内置的 bash。 $VARIABLE=abcdef$if[[$VARIABLE== 123456 ]] ;thenechoyes ;elseechono ;fino 括号(())用于创建子外壳。例如: $pwd/home/user$(cd/tmp;pwd)/tmp$pwd/home/user 如您所见,子 Shell 使您可以执行操作而不会影响当前 Shell 的环境。