linux - unix shell set command -


want know set -a option in below command?

 xmloutfile=${xmloutdir}/${test_id}  set -a files "${xmloutfile}"  

set -a korn shell (ksh) specific (not available in bash or posix sh) , initializes array specified value(s).

here's example:

$ set -a colors "red" "green" "blue" $ print ${colors[0]} red $ print ${colors[1]} green $ print ${colors[2]} blue 

in example, ${files[0]} set $xmloutfile.

instead of using set -a can use example array[0]="value" more portable.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -