0
我在尝试使用自己的脚本在nmon部署在linux环境中运行nmon时出现问题。关于nmon的基本bash shell脚本
基于此脚本,我需要执行命令“test.sh 2 5”,与由值2表示的变量和5
#!/bin/bash
#sh test.sh variable1 variable2
./nmon -f -s$1 -c $2
total=$(($1 * $2))
echo "------------------------------------------------"
echo -e "Providing $2 snapshots with interval of $1s"
echo -e "Saving into $HOSTNAME. Completing in $total seconds\n\n"
然而,我收到以下输出:
[[email protected] ~]$ sh nmonscript2.sh 2 4
------------------------------------------------
Providing 4 snapshots with interval of 2s
secondsnto bssosmappv4001. Completing in 8
我可以知道我错过了哪个部分吗?为什么它不能正确显示输出?