#!/bin/bash
1.显示普通字符串
echo “It is a text.”
echo It is a text.
2.显示转义字符
echo ““It is a text.””
echo “It is a text.”
3. 显示变量
name=nnnnnnnnnnn
echo “$name It is a text.”
4. 显示换行 -e
echo -e “OK! \n”
echo OK
5. 显示不换行
echo -e “OK! \c”
echo “OK!”
6. 显示结果定向至文件
echo It is a text. > myfile
7. 原样输出
echo ‘$name"’
8. 显示命令执行结果
echo `date`