📌  相关文章
📜  如何比较 zsh 脚本中的字符串 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:46.260000             🧑  作者: Mango

代码示例1
#!/bin/sh

argn=$#
i=0

for arg do
   shift
   i=$(( i + 1 ))

   if [ "$i" -lt "$argn" ]; then
       set -- "$@" ssh -t "$arg"
   else
       set -- "$@" "/pathtofile/$arg/log.log"
   fi
done

command "$@"