GNU Bash, version 4.0

Bash 4.0版本发布,引入了一系列新特性:新增环境变量$BASHPID显示当前进程PID;checkjobs命令检查作业状态;改进了子进程创建失败的处理方式;ulimit命令增加了-b和-T选项;&>>操作符同时追加标准输出与错误至文件。此外,Readline功能得到增强,新增history-size变量用于设置历史记录数量。

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

GNU Bash(Bourne-Again SHell) 发布了 4.0 版本。新增加了不少特性。最近大半年基本上很少在终端里了,不过还是要关注一下。

新特性不完全列表
列出几个日常使用有关的:

  • 新的环境变量 $BASHPID 用以返回当前进程 PID。
  • 新的 ‘checkjobs’ 命令检查报告 Job 运行的情况。
  • 如因为缺少资源而创建子进程失败,bash 再尝试几次之后再报错(这个怎么觉得有点傻?)
  • ‘ulimit’ 内建新选项 -b (socket buffer size) 与 -T (number of threads)。
  • 新的 &>> 重定向操作符,追加标准输出与标准错误到指定文件中。

其他新功能多和 Bash 下的 Shell 编程有关,感兴趣的可以仔细看一下说明文件

此外,Readline 有了比较大的功能增强。大家用的最多的命令行历史,现在有了新的 history-size 变量用来设定。

EOF

Google+
zsc@ubuntu:/code/openwrt-15.05.1$ awk --version # 应≤4.1.0 GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.4, GNU MP 6.1.0) Copyright (C) 1989, 1991-2015 Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. zsc@ubuntu:/code/openwrt-15.05.1$ bash --version # 应≤4.3.0 GNU bash, version 4.3.48(1)-release (i686-pc-linux-gnu) Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. zsc@ubuntu:/code/openwrt-15.05.1$ perl -v # 应≤5.20.0 This is perl 5, version 22, subversion 1 (v5.22.1) built for i686-linux-gnu-thread-multi-64int (with 77 registered patches, see perl -V for more detail) Copyright 1987-2015, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
最新发布
08-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值