[Linux] bash shell总结

本文详细介绍了Linux bash shell的使用,包括标准、简介、注意事项、常见缺点、set -x、各种括号用法以及错误处理。通过实例展示了如何解决'unary operator expected'错误,讲解了bash与ksh的区别,并提供了大量的shell脚本使用示例,如变量、数组、重定向、管道、条件判断等。同时,文章也提醒了shell脚本的性能问题和文件名包含空格可能导致的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

文章目录

标准

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html#tag_12_02
https://www.gnu.org/software/bash/
https://wiki.gentoo.org/wiki/Mksh

简介

就是Linux系统的一个外部接口,外壳。
Bash is the GNU Project’s shell—the Bourne Again SHell. This is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and the C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers functional improvements over sh for both programming and interactive use. In addition, most sh scripts can be run by Bash without modification.
https://bugzilla.kernel.org/show_bug.cgi?id=217459

需要注意的一个问题

<
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mzhan017

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值