使用内核 2.6.x
您将如何使用 sh(不是 bash、zsh 等)使用以下变量编写下面的结果?
VAR1="abc def ghi"
VAR2="1 2 3"
CONFIG="$1"
for i in $VAR1; do
for j in $VAR2; do
[ "$i" -eq "$j" ] && continue
done
command $VAR1 $VAR2
done
Run Code Online (Sandbox Code Playgroud)
想要的结果:
command abc 1
command def 2
command ghi 3
Run Code Online (Sandbox Code Playgroud)