shell程序

例一:helloworld 

#!/bin/sh -x
message="hello"
read name
echo "$message ,$name"

 例二:选择性程序

#!/bin/sh
menu=("Apple" "Grape" "Orange")

PS3="喜欢哪个"

select item in ${menu[@]};do
  echo "喜欢$item"
done

 PS3是内置变量

原文地址:https://www.cnblogs.com/bluewelkin/p/4300558.html