ITeye博客

bash

basin6421 · 2010-11-03 12:27 · 操作系统 · Bash · Markdown

bash -vx ./b -v 显示命令 -x 显示一条一条

#!/bin/bash
read AAA
if [ $aaa = shrek ]
	then
		echo hello shrek
	elif   [ $aaa = "root" ]
		then echo hello root
	else
		echo 'get out here !'
fi

case 命令


read BBB
case $BBB in
		shrek)
			echo hello, shrek
			echo nice to meet you
			;;
		root)
			echo hello, root
			echo nice to meet you too
			;;
		*)
			echo hello “笨蛋”
			;;
esac

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。