B Shell。1979年
Bourne Shell。 Linux识别为sh。
B Shell家族包括sh, ksh, Bash, psh, zsh。
C Shell
主要在BSD UNIX系统中使用。
C Shell家族包括 csh, tcsh。
当前Linux系统支持的Shell。 /etc/shells。
root@csc:/home/css/.local/share/Trash/files# cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
echo 字符转换命令, 加-e 参数
\\ 输出\本身
\b 输出退格键
\n 换行符
\r 回车
\t TAB键
\0nnn 八进制
\xhh 十六进制
root@csc:~# echo -e "ab\bc"
ac
root@csc:~# echo -e "a\tb\tc\nd\te\tf"
a b c
d e f
root@csc:~# echo -e "\x61\t\x62\t\x63\n\x62\t\x63\t\x64"
a b c
b c d
Shell脚本
#!/bin/bash
快捷键
ctrl+a 光标移动到开头
ctrl+e 光标移动到结尾
ctrl+u 删除命令,剪切命令
ctrl+y 粘贴命令
ctrl+L 清屏clear。
history和alias配置在家目录的.bashrc。
vi ~/.bashrc
阅读(345) | 评论(0) | 转发(0) |