0
点赞
收藏
分享

微信扫一扫

Linux Shell脚本修炼笔记

1.shell和shell脚本

2.shell脚本编程规范

3.shell脚本执行方式

①sh xx.sh 此方式执行,脚本可以没有执行权限

②./xx.sh 或 ./path/xx.sh 此方法脚本需要执行权限(chmod +x xx.sh 或 chmod 755 xx.sh)

4.Bash 的 基本命令

①历史命令 history

-c 清空历史命令

-w 历史命令保存(默认在 cat ~/.bash_history)

!n 执行之前执行过的命令

!! 直接执行上一条命令

②tab命令补全

增强包 bash-completion 支持对systemctl命令服务名称的补全

③alias 别名(需要补充)

临时

永久

④bash的快捷键

Linux Shell脚本修炼笔记_补全

⑤输入输出重定向

Linux Shell脚本修炼笔记_shell脚本_02

输出重定向 : <

Linux Shell脚本修炼笔记_补全_03Linux Shell脚本修炼笔记_补全_04

举报

相关推荐

0 条评论