---
title: "bash"
author: "basin6421"
date: "2010-11-03T12:27:26Z"
tags: ["Bash"]
categories: ["操作系统"]
slug: "bash"
draft: false
lastmod: "2010-11-03T12:27:26Z"
id: 801529
url: "https://basin6421.iteye.com/blog/801529"
---

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

```shell
#!/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 命令

```shell

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
```