建立第一个Bash shell
touch first_script.sh
vi first_script.sh
输入以下:
#!/bin/bash
echo "Hello, World!"
echo "Knowledge is power."
# 将该文件改为可以执行文件并执行
new@Chevy-PC:~$ chmod 777 first_script.sh
new@Chevy-PC:~$ ./first_script.sh
Hello, World!
Knowledge is power.
$(命令)
-e 扮演了转义字符反斜线的翻译器
-e \b 删除空格
-e \r 回车(会覆写行开头的字符)
-e \c 不回车
-e \t 制表位
-e \a 警告音
-e \v 垂直制表符
-n 删除换行