标签: shell
这里是Shell脚本的新手。尝试编写一些以“ -h”为参数的内容,以显示帮助说明。每次都显示“ -h”时发现错误。用法:./ test.sh -h
#!/bin/sh for arg in "$1";do if ["$arg" = "-h"];then echo "Help argument detected."; fi done echo "bye"