code

macname@localhost Desktop % cat test.sh 
my_array[0]=A
my_array[1]=B
my_array[2]=C
my_array[3]=D

echo "数组的元素为: ${my_array[*]}"
echo "数组的元素为: ${my_array[@]}"
macname@localhost Desktop % 
macname@localhost Desktop % ./test.sh          
数组的元素为: A B C D
数组的元素为: A B C D

 

 

 

 

 

 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2021-04-30
  • 2021-12-04
  • 2022-02-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-21
  • 2021-08-04
  • 2022-12-23
  • 2021-12-07
  • 2021-07-01
  • 2021-06-06
相关资源
相似解决方案