宁静致远_jin: u are right! and i have another method to receive one arr by chatgpt: [code=plain] #!/bin/bash # 接收参数数组 params=("$@") # 输出参数数组 echo "Received parameters:" for param in "${params[@]}"; do echo "- $param" done [/code] but i still have a question: if i wanna input multiple arr when i invoking shell script,the array structual still be destroyed. it confuses me have long u please give me some advices? thank you so much.
shell 脚本命令太长,如何换行?
shell中的数组作为参数传递